| | |
| | | List<SysCodeDtl> questiontype = ViewData["questiontype"] as List<SysCodeDtl>; //问题类型 |
| | | |
| | | List<DTO.PageEntity> pageEntities = ViewData["pageEntities"] as List<DTO.PageEntity>; //问题类型 |
| | | var shenhesto = pageEntities.Where(x => x.PageName == "审核").FirstOrDefault(); |
| | | string shenhe = ""; |
| | | if (shenhesto != null) |
| | | { |
| | | shenhe = shenhesto.PageName; |
| | | } |
| | | var tijiaobingshenhesto = pageEntities.Where(x => x.PageName == "提交并审核").FirstOrDefault(); |
| | | string tijiaobingshenhe = ""; |
| | | if (tijiaobingshenhesto != null) |
| | | { |
| | | tijiaobingshenhe = tijiaobingshenhesto.PageName; |
| | | } |
| | | |
| | | |
| | | } |
| | | <!DOCTYPE html> |
| | | <html> |
| | |
| | | |
| | | </div> |
| | | |
| | | <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> |
| | | 是否出书 |
| | | </label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | @if ("A" == Model.ChushuStatus) |
| | | { |
| | | <input type="checkbox" class="form-control" id="ChushuStatusName" checked="checked" name="ChushuStatusName" value="A" /> |
| | | } |
| | | else |
| | | { |
| | | <input type="checkbox" class="form-control" id="ChushuStatusName" name="ChushuStatusName" value="A" /> |
| | | } |
| | | <input type="hidden" id="ChushuStatus" name="ChushuStatus" value="" /> |
| | | |
| | | </div> |
| | | |
| | | @*<label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> |
| | | 收藏 |
| | | </label> |
| | | <div class="col-sm-2 col-md-2" grouptype="Vdata"> |
| | | @if ("A" == Model.ShouCangStatus) |
| | | { |
| | | <input type="checkbox" class="form-control" id="ShouCangStatusName" checked="checked" name="ShouCangStatusName" value="A" /> |
| | | } |
| | | else |
| | | { |
| | | <input type="checkbox" class="form-control" id="ShouCangStatusName" name="ShouCangStatusName" value="A" /> |
| | | } |
| | | <input type="hidden" id="ShouCangStatus" name="ShouCangStatus" value="" /> |
| | | |
| | | </div>*@ |
| | | |
| | | </div> |
| | | <div class="clearfix layer-area" style="padding-bottom:15px;"> |
| | | <label class="text-right col-sm-1 col-md-1 control-label">问题<i class="red">*</i></label> |
| | |
| | | |
| | | <div class="ibox-content" id="top" style="z-index:100; position:fixed; height:50px; width:100%;bottom:0; text-align: right; padding-top:8px "> |
| | | <div class="" style="float:right;" data-bootstro-width="500px" data-bootstro-content="功能按钮:“保存”,“删除”"> |
| | | <a class="btn btn-success" id="tijiaobingshenhebtn" href="javascript:void(0)" onclick="tijiaobingshenhePosition();" style="margin-left:4px; border-radius:4px;"> |
| | | <i class="glyphicon glyphicon-ok"></i> <span class="bold">提交并审核</span> |
| | | </a> |
| | | |
| | | <a class="btn btn-success" href="javascript:void(0)" onclick="delPosition();" style="margin-left:4px; border-radius:4px;"> |
| | | <i class="glyphicon glyphicon-remove"></i> <span class="bold">删除</span> |
| | | </a> |
| | |
| | | $("#div_content").height(hh); |
| | | |
| | | var id = '@Model.Id'; |
| | | var pageEntities = @pageEntities.Count; |
| | | var shenhe = '@shenhe'; |
| | | var tijiaobingshenhe = '@tijiaobingshenhe'; |
| | | var Clientid = '@Model.Clientid'; |
| | | if (id == null || id == '') { |
| | | $("#shenhebtn").hide(); |
| | | } else if (pageEntities <= 0 || Clientid == "A") { |
| | | } else if (shenhe == "" || Clientid == "A") { |
| | | $("#shenhebtn").hide(); |
| | | } else { |
| | | $("#shenhebtn").show(); |
| | | } |
| | | |
| | | if (tijiaobingshenhe == "") { |
| | | $("#tijiaobingshenhebtn").hide(); |
| | | } else { |
| | | $("#tijiaobingshenhebtn").show(); |
| | | } |
| | | |
| | | toastr.options = { |
| | | "closeButton": true, |
| | | "debug": false, |
| | |
| | | toastr.warning("答案不能为空"); |
| | | return; |
| | | } |
| | | |
| | | if ($("#ChushuStatusName").is(':checked')) { |
| | | $("#ChushuStatus").val("A"); |
| | | } else { |
| | | $("#ChushuStatus").val("D"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] }); |
| | | $.ajax({ |
| | |
| | | url: "/Liaotian/Save", |
| | | dataType: "json", |
| | | global: false, |
| | | data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val()}, |
| | | data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val()}, |
| | | success: function (data) { |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | // 保存岗位信息 |
| | | var tijiaobingshenhePosition = function () { |
| | | if (Verify.isNull($("#Questiontype").val())) { |
| | | toastr.warning("问题类别不能为空"); |
| | | return; |
| | | } |
| | | if (Verify.isNull($("#Problemtype").val())) { |
| | | toastr.warning("题目类别不能为空"); |
| | | return; |
| | | } |
| | | if (Verify.isNull($("#Question").val())) { |
| | | toastr.warning("问题不能为空"); |
| | | return; |
| | | } |
| | | |
| | | if (Verify.isNull($("#Anwser").val())) { |
| | | toastr.warning("答案不能为空"); |
| | | return; |
| | | } |
| | | |
| | | if ($("#ChushuStatusName").is(':checked')) { |
| | | $("#ChushuStatus").val("A"); |
| | | } else { |
| | | $("#ChushuStatus").val("D"); |
| | | } |
| | | |
| | | |
| | | imgLoad = parent.layer.load(2, { shade: [0.2, '#fff'] }); |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/Liaotian/Tijiaobingshenhe", |
| | | dataType: "json", |
| | | global: false, |
| | | data: { Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val() }, |
| | | success: function (data) { |
| | | |
| | | |
| | | if (data.Result) { |
| | | // parent._afterSave(true); |
| | | parent.layer.msg('保存成功', { icon: 6 }); |
| | | _pageAutoClose();//自动关闭页面方法 |
| | | } |
| | | else { |
| | | if ($.isNumber(imgLoad)) { |
| | | parent.layer.close(imgLoad); |
| | | } |
| | | // toastr.error(""); |
| | | parent.layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | |
| | | }, |
| | | error: function () { |
| | | if ($.isNumber(imgLoad)) { |
| | | parent.layer.close(imgLoad); |
| | | } |
| | | //toastr.error("保存失败"); |
| | | |
| | | parent.layer.msg('保存失败', { icon: 5 }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | $("#ShouCangStatusName").change(function () { |
| | | |
| | | if ($("#ShouCangStatusName").is(':checked')) { |
| | | $("#ShouCangStatus").val("A"); |
| | | } else { |
| | | $("#ShouCangStatus").val("D"); |
| | | } |
| | | |
| | | |
| | | $.ajax({ |
| | | type: "POST", |
| | | url: "/Liaotian/ShouCang", |
| | | dataType: "json", |
| | | global: false, |
| | | data:{ Id: id, Question: $("#Question").val(), Anwser: $("#Anwser").val(), Questiontype: $("#Questiontype").val(), Problemtype: $("#Problemtype").val(), Shiyongfatiao: $("#Shiyongfatiao").val(), ChushuStatus: $("#ChushuStatus").val(), ShouCangStatus: $("#ShouCangStatus").val() }, |
| | | success: function (data) { |
| | | |
| | | if (data.Result) { |
| | | // parent._afterSave(true); |
| | | parent.layer.msg('操作成功', { icon: 6 }); |
| | | |
| | | } |
| | | else { |
| | | |
| | | parent.layer.msg(data.Message, { icon: 5 }); |
| | | } |
| | | }, |
| | | error: function () { |
| | | |
| | | |
| | | parent.layer.msg('失败', { icon: 5 }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | $("#Questiontype").change(function () { |
| | | |