123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- @model EMIS.ViewModel.EvaluationManage.EvaluationTable.EvaluationNormView
- @using EMIS.Web.Controls;
- @using Bowin.Web.Controls.Mvc;
- @{
- ViewBag.Title = "Edit";
- var isEnable = Request["type"] == "detail" ? false : true;
- }
- @section scripts{
- <script src="~/Scripts/Business/EvaluationManage/EvaluationTable/EvaluationNormEdit.js" type="text/javascript"></script>
- <script type="text/javascript">
- var nonSelect = "@DropdownList.SELECT_ALL";
- var checkBoxNormTypeID = "@((int)EMIS.ViewModel.EM_EvaluationNormType.CheckBox)";
- //加载
- $(document).ready(function () {
- var normTypeID = '@ViewBag.NormTypeID'
- if (normTypeID == checkBoxNormTypeID) {
- $("#divDetail").show();
- } else {
- $("#divDetail").hide();
- }
- });
- </script>
- }
- <div class="separatorline" data-options="border:false,fit:true" style="position: relative;">
- @using (Ajax.BeginForm(new AjaxOptions
- {
- 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>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- @if (Request["type"] != "detail")
- {
- @Html.ContextMenuBar("Edit")
- }
- </div>
- </div>
- <div class="gobal-from">
- @Html.HiddenFor(x => x.EvaluationNormID)
- <table cellpadding="0" cellspacing="1" id="evaluationnormtable">
- <tr>
- <th style="color:red;">
- @Html.LabelFor(x => x.Name):
- </th>
- <td colspan="3">
- @Html.TextBoxFor(x => x.Name, new TextBoxOptions() { IsEnabled = isEnable }, new Dictionary<string, string> { { "style", "width:84%;" } })
- </td>
- </tr>
- <tr>
- <th style="color:red;">
- @Html.LabelFor(x => x.NormTypeID):
- </th>
- <td>
- @Html.DictionaryComboGridFor(EMIS.ViewModel.DictionaryItem.EM_EvaluationNormType, (x => x.NormTypeID), DropdownListBindType.PleaseSelect, new ComboGridOptions() { OnSelect="queryNormType", IsEnabled = isEnable })
- </td>
- <th style="color:red;">
- @Html.LabelFor(x => x.SatisfyWeight):
- </th>
- <td>
- @Html.TextBoxFor(x => x.SatisfyWeight, new TextBoxOptions() { IsEnabled = isEnable })
- </td>
- </tr>
- <tr>
- <th>
- @Html.LabelFor(x => x.Remark):
- </th>
- <td colspan="3">
- @if (!isEnable)
- {
- @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object>
- {
- { "style", "width: 90%;min-height: 60px" },
- { "disabled", "true" }
- })
- }
- else
- {
- @Html.TextAreaFor(x => x.Remark, new Dictionary<string, object> { { "style", "width: 90%;min-height: 60px" } })
- }
- </td>
- </tr>
- </table>
- </div>
- <div id="divDetail">
- <div class="p_title">
- <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">评分标准明细列表</div>
- <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">
- @if (Request["type"] != "detail")
- {
- @Html.ContextMenuBar("DetailList")
- }
- </div>
- </div>
- <div class="search_list">
- @if (!isEnable)
- {
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- //new CheckBoxFieldColumn{ HeaderText="", FieldName="EvaluationNormDetailID" },
- new LinkButtonColumn { FieldName="OrderNo", HeaderText="次序", Align=AlignStyle.Center, Handle="edit", Width=0.03 },
- new BoundFieldColumn { FieldName="Name", HeaderText="名称", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="Weight", HeaderText="权重(100%)", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.05 }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- IsPostBack = true,
- DataSourceUrl = Url.Content("~/EvaluationNorm/EvaluationNormDetailViewList?evaluationNormID=" + Model.EvaluationNormID),
- ID = "dgEvaluationNormDetailList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- MaxHeight = 125
- })
- }
- else
- {
- @Html.DataGrid(new DataGridOptions
- {
- Columns = new List<DataGridColumn>()
- {
- new CheckBoxFieldColumn{ HeaderText="", FieldName="EvaluationNormDetailID" },
- new LinkButtonColumn { FieldName="OrderNo", HeaderText="次序", Align=AlignStyle.Center, Handle="edit", Width=0.03 },
- new BoundFieldColumn { FieldName="Name", HeaderText="名称", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="Weight", HeaderText="权重(100%)", Align=AlignStyle.Center, Width=0.06, CustomFormatFun="SetRedColumn" },
- new BoundFieldColumn { FieldName="Remark", HeaderText="备注", Align=AlignStyle.Center, Width=0.05 }
- },
- PageSize = 5,
- IsCheckOnSelect = true,
- IsPostBack = true,
- DataSourceUrl = Url.Content("~/EvaluationNorm/EvaluationNormDetailViewList?evaluationNormID=" + Model.EvaluationNormID),
- ID = "dgEvaluationNormDetailList",
- IsPagination = true,
- IsShowRowNumbers = true,
- IsSingleSelect = false,
- MaxHeight = 125
- })
- }
- </div>
- </div>
- }
- </div>
|