@using WeApp.Configuration
@using WeApp.Authorization
@using WeApp.Views.Shared.Modals
@using WeApp.Views.Shared.SearchForm
@using WeApp.Views.Shared.Table
@{
ViewBag.Title = "培训营情景附件配置";
string activeMenu = PermissionNames.PagesTrainMgCampMg; //The menu item will be active for this page.
ViewBag.ActiveMenu = activeMenu;
string fileType = "";
var campNo = ViewBag.CampNo;
var packageNo = ViewBag.PackageNo;
string phoneQuestion = ViewBag.PhoneQuestion;
var searchForm = new SearchFormViewModel(new List()
{
new SearchItem("sceneNo", "情景编号"),
new SearchItem("sceneName", "情景简称"),
});
var searchForm2 = new SearchFormViewModel(new List()
{
new SearchItem("fileName", "附件名称"),
}, "search-attach-form");
var table = new TableViewModel(IwbConsts.ApiAppUrl + "Camp/GetSceneAttaches?no=" + campNo, null, searchForm, tableId: "table")
.SetFields(new List()
{
new FieldItem("campName", "培训营"),
new FieldItem("sceneNo", "情景编号"),
new FieldItem("sceneName", "情景简称"),
new FieldItem("", "附件/电话提问信息","ActionFormatter").SetWidth(400),
});
var attachTable = new TableViewModel(IwbConsts.ApiAppUrl + "Camp/GetAttachFiles?no=" + packageNo, null, searchForm2, tableId: "table-attach")
.SetFields(new List()
{
new FieldItem("fileTitle", "附件名称","LinkActionFormatter"),
new FieldItem("", "操作","FileActionFormatter").SetWidth(120),
});
}
@section css{
}
@Html.Partial("Table/_Table", table)
@Html.Partial("Table/_Table", attachTable)
@section modal{
@{
var modal = new ModalViewModel("情景附件配置", new ModalBodyViewModel(new List()
{
new InputHide("id"),
new InputHide("campNo"),
new InputHide("sceneNo"),
new Input("sceneName", "情景简称"),
new Input("attachNos", "情景附件").SetNotRequired().SetSelectOptions("",true),
new Input("phoneQuestionNos", "电话提问").SetNotRequired().SetSelectOptions(phoneQuestion),
}), "modal-scene");
var modalFile = new ModalViewModel("上传附件", new ModalBodyViewModel(new List()
{
new InputHide("id"),
new InputHide("campNo"),
new InputHide("tableName"),
new InputHide("columnName"),
new InputHide("sourceKey"),
new Input("fileTitle", "附件名称"),
new Input("fileType", "附件类型").SetSelectOptions(fileType),
new InputFile("file", "上传文件").SetFileOption("fileInfo","fileName","fileExt",100),
}), "modal-file");
}
@Html.Partial("Modals/_Modal", modal)
@Html.Partial("Modals/_Modal", modalFile)
}
@section scripts
{
}
@*@Html.DropDownList("hid-type", type)*@