12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- @using WeApp
- @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.PagesBasicMgPhoneAnswerMg; //The menu item will be active for this page.
- ViewBag.ActiveMenu = activeMenu;
- var searchForm = new SearchFormViewModel(new List<SearchItem>()
- {
- new SearchItem("keywords","关键字"),
- },"search-form",false);
- var table = new TableViewModel(IwbConsts.ApiAppUrl + "PhoneAnswer/GetAll", activeMenu, searchForm)
- .SetFields(new List<FieldItem>()
- {
- new FieldItem("content", "内容"),
- new FieldItem("keywords", "关键字"),
- new FieldItem("type", "答案类型"),
- new FieldItem("questionNo", "培训营"),
- });
- var inputs = new List<Input>()
- {
- new InputHide("id"),
- new Input("content", "内容"),
- new Input("keywords", "关键字"),
- new InputNumber("type", "答案类型"),
- new Input("questionNo", "培训营").SetNotRequired(),
- };
- var modalBody = new ModalBodyViewModel(inputs);
- var modal = new ModalViewModel("答案",modalBody);
- }
- @section css{
-
- }
- @Html.Partial("Table/_Table", table)
- @section modal{
- <!--Modal Start-->
- @Html.Partial("Modals/_Modal", modal)
- <!--Modal End-->
- }
- @section scripts
- {
- <script type="text/javascript">
- var $table;
- $(function () {
- $table = LoadTable();
- var funs = window.iwbfuns || { none: function () { console.log("No type"); } };
- funs["btnCreate"] = function() { BtnCreate({ data: { id: "" } }); }
- funs["btnUpdate"] = function () { BtnUpdate({ disabled: "" }); };
- });
- </script>
- <!--格式化-->
- <script id="formatter-script" type="text/javascript">
- function TypeFormatter(v) {
- var name = $('#hid-type option[value="' + v + '"]').text();
- switch (v) {
- case 0:
- return '<span class="label label-danger">' + name +'</span>';
- default:
- return '<span class="label label-info">' + name +'</span>';
- }
- }
- </script>
- }
- <section style="display: none">
- <select id="hid-type">
- <option value=""></option>
- </select>
- @*@Html.DropDownList("hid-type", type)*@
- </section>
|