123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- @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<DataGridColumn>()
- {
- 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<DataGridColumn>()
- {
- 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<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/SupplierList"),
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
-
- }
- };
-
- var stockInID = Request.Params["stockInID"];
- }
- @section scripts{
- <script src="~/Scripts/Business/TeachingMaterial/StockInEdit.js"></script>
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- //保存数据
- function ET06_05_01_StockIn_Save() {
- $("#hid_ApprovalStatusName").val("Save"); //保存
- $(document.forms[0]).submit(); //提交表单
- }
- //提交以后的数据、即不允许做修改、删除操作!
- function ET06_05_01_StockIn_Submit() {
- $("#hid_ApprovalStatusName").val("Submit"); //提交
- $(document.forms[0]).submit(); //提交表单
- }
- function QueryLibraryDropdownList() {
- var s = $("#LibraryDropdown").combobox("getValue");
- }
- //获取选中的数据、保存单头有明细
- 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 = "/StockIn/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;">
- 教材入库信息
- </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_ApprovalStatusName")
- @Html.HiddenFor(x => x.StockInID)
- <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.StockInType):
- </td>
- <td>
- @Html.DictionaryDropDownListFor(EMIS.ViewModel.DictionaryItem.CF_StockInType, (x => x.StockInType), new DropdownListOptions { IsEnabled = false })
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.StockInDocumentNo):
- </td>
- <td>
- @Html.TextBoxFor(x => x.StockInDocumentNo)
- </td>
- <td>
- @Html.LabelFor(x => x.StockInNumber):
- </td>
- <td>
- @Html.TextBoxFor(x => x.StockInNumber)
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.SupplierID):
- </td>
- <td>
- @Html.ComboGridFor(x => x.SupplierID, Psop)
- </td>
- <td>
- @Html.LabelFor(x => x.StockInDJTime):
- </td>
- <td>
- @Html.TextBoxFor(x => x.StockInDJTime, new TextBoxOptions { TextBoxType = TextBoxType.DateTime })
- </td>
- </tr>
- @*<tr>
- <td>
- @Html.LabelFor(x => x.RoomNumber):
- </td>
- <td>
- @Html.ComboGridFor(x => x.RoomNumber,LibraryCode)
- </td>
- <td>
- @Html.LabelFor(x => x.LibraryName):
- </td>
- <td>
- @Html.ComboGridFor(x => x.LibraryID, LibraryCode)
- </td>
- </tr>*@
- <tr>
- <td>
- @Html.Label("教材信息"):
- </td>
- <td colspan="3">
- @if (Model.RecordStatus != (int)CF_GeneralPurpose.IsYes)//如果已经提交、那么删除、增加按钮不显示
- {
- @Html.ContextMenuBar("Edit-StockInViewGrid")
- }
- @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="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
- })
- </td>
- </tr>
- <tr>
- <td>
- @Html.LabelFor(x => x.Desc):
- </td>
- <td colspan="3">
- @Html.TextAreaFor(x => x.Desc, new Dictionary<string, object> { { "style", "width:85%;" } })
- </td>
- </tr>
- </table>
- </div>
- }
- </div>
|