@using ShwasherSys @using ShwasherSys.Authorization.Permissions @using ShwasherSys.Models.Layout @using ShwasherSys.Views.Shared.New.Modals @using ShwasherSys.Views.Shared.New.Table @{ ViewBag.Title = "设备维护计划"; string activeMenu = PermissionNames.PagesCompanyDieMaintenanceDeviceMgPlan; //The menu item will be active for this page. List fixedAsset = ViewBag.FixedAsset, planType = ViewBag.PlanType; ViewBag.ActiveMenu = activeMenu; var searchForm = new SearchFormViewModal(new List() { new SearchItem("no","计划编号"), new SearchItem("name","设备名称").SetSearchItem(fixedAsset,isAddBlank:false), new SearchItem("expireDate","有效期限",FiledType.D,ExpType.GreaterOrEqual), new SearchItem("expireDate","至",FiledType.D,ExpType.LessOrEqual), new SearchItem("maintenanceDate","维护时间",FiledType.D,ExpType.GreaterOrEqual), new SearchItem("maintenanceDate","至",FiledType.D,ExpType.LessOrEqual), // new SearchItem("nextMaintenanceDate","下一次维护时间",FiledType.Dnull,ExpType.GreaterOrEqual), // new SearchItem("nextMaintenanceDate","至",FiledType.Dnull,ExpType.LessOrEqual), }, "search-form", false); var table = new TableViewModel("/api/services/app/DeviceMgPlan/GetAll", activeMenu, searchForm) .SetFields(new List() { new FieldItem("no", "计划编号"), new FieldItem("planType", "计划类型","PlanTypeFormatter"), new FieldItem("name", "设备名称"), new FieldItem("deviceNo", "设备编号"), new FieldItem("expireDate", "有效期限","ExDateFormatter"), new FieldItem("maintenanceCycle", "维护周期"), new FieldItem("maintenanceDate", "维护时间","DateFormatter"), new FieldItem("nextMaintenanceDate", "下一次维护","MtDateFormatter"), }); } @section css{ } @Html.Partial("New/Table/_Table", table) @section modal{ @{ var modal = new ModalViewModel("设备计划", new ModalBodyViewModel(new List() { new InputHide("id"), new InputHide("no", "计划编号"), new Input("planType", "计划类型").SetSelectOptions(planType), new InputHide("deviceNo").SetNotRequired(), //new Input("deviceName1", "设备名称",@class:"type type1",other:"onchange=DeviceNameChange(this)").SetSelectOptions(fixedAsset,isAddBlank:false), new Input("deviceName1", "模具名称",@class:"type type1").SetSearchIcon("query_mold_modal","#modal"), new Input("deviceName2", "设备名称",@class:"type type2").SetSearchIcon("query_device_modal","#modal"), new Input("name","设备名称",@class:"type type3"), new InputDate("expireDate", "有效期限"), new InputNumber("maintenanceCycle", "维护周期",other:"min=1"), new InputDate("maintenanceDate", "维护时间"), new InputTextarea("description", "维护内容").SetNotRequired(), })); } @{ var recordModal = new ModalViewModel("添加维护记录", "", new ModalBodyViewModel(new List() { new InputHide("id"), new InputHide("no", "计划编号"), new Input("name", "设备名称"), new Input("address", "维护地点"), new InputDate("planDate", "计划维护时间").SetNotRequired(), new InputTextarea("description", "维护内容").SetNotRequired(), }), "record-modal"); } @Html.Partial("New/Modals/_Modal", modal) @Html.Partial("New/Modals/_Modal", recordModal) @Html.Partial("Modals/Query/_Device", "deviceNo,name|deviceName2") @Html.Partial("Modals/Query/_Mold", "deviceNo,name|deviceName1,maintenanceCycle") } @section scripts { }
@Html.DropDownList("hid-planType", planType)