@{
|
ViewBag.Title = "Liaotian";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
}
|
@section headerStyle{
|
<script type="text/javascript">
|
var problemtypeDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.problemtype))';
|
var questiontypeDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.questiontype))';
|
var Creater = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Creater))';
|
var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
|
|
loseherght = 30;
|
dataCol = [
|
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
|
{ label: '问题类别', name: 'Questiontype', labtype: 'txt', hidden: false, width: 55 },
|
{ label: '题目类别', name: 'Problemtype', labtype: 'txt', hidden: false, width: 75 },
|
{
|
label: '问题', name: 'Question', labtype: 'txt', hidden: false, width: 400 ,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a onclick=\"OpenWindow('修改问题','98%','100%', '/Liaotian/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>";
|
}
|
},
|
{ label: '回答', name: 'Anwser', labtype: 'textarea', hidden: false, width: 800 },
|
{ label: '适用法条', name: 'Shiyongfatiao', labtype: 'textarea', hidden: false, width: 200 },
|
{
|
label: '是否审核', name: 'Clientid', labtype: 'txt', hidden: false, width: 100,
|
formatter: function (cellvalue, options, rowObject) {
|
if (cellvalue == "D") {
|
return "否"
|
} else {
|
return "是"
|
}
|
|
|
|
}
|
},
|
{
|
label: '是否出书', name: 'ChushuStatus', labtype: 'txt', hidden: false, width: 100,
|
formatter: function (cellvalue, options, rowObject) {
|
if (cellvalue == "D") {
|
return "否"
|
} else {
|
return "是"
|
}
|
|
|
|
}
|
},
|
{ label: '状态', name: 'RecStatus', labtype: 'txt', hidden: true },
|
{ label: '创建人', name: 'Creater', labtype: 'txt', hidden: true },
|
{ label: '创建时间', name: 'Createtimetxt', labtype: 'txt', hidden: true },
|
{ label: '修改人', name: 'Modifier', labtype: 'txt', hidden: true },
|
{ label: '修改时间', name: 'Modifytimetxt', labtype: 'txt', hidden: true }
|
];
|
dataUrl = "/Liaotian/GetLiaotianList?Shifoushenhe=D";
|
searchCol = [
|
|
{ label: '问题类别', name: 'Questiontype', labtype: 'combox', hidden: false, data: JSON.parse(questiontypeDropDown), cwidth: '5%', cccwidth: '8%' },
|
// { label: '题目类别', name: 'Problemtype', labtype: 'txt', hidden: false },, data: JSON.parse(problemtypeDropDown)
|
{ label: '题目类别', name: 'Problemtype', labtype: 'combox', hidden: false, data: [], cwidth: '5%', cccwidth: '8%'},
|
{ label: '问题', name: 'Question', labtype: 'txt', hidden: false },
|
{ label: '是否审核', name: 'Shifoushenhe', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
|
{ label: '录入时间', name: 'Createtime', labtype: 'datearea', hidden: false },
|
{ label: '录入人', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(Creater), cwidth: '5%', cccwidth: '8%' },
|
{ label: '是否出书', name: 'ChushuStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
|
//{ label: '是否收藏', name: 'ShouCangStatus', labtype: 'combox', hidden: false, data: JSON.parse(shifou), cwidth: '5%', cccwidth: '8%' },
|
];
|
var _pageAdd = function () {
|
OpenWindow("新增问题", "98%", "90%", "/Liaotian/Edit/");
|
}
|
var _pageSearch = function () {
|
$("#jqGrid").jqGrid('setGridParam', {
|
url:'/Liaotian/GetLiaotianList', postData: jsons, page: 1
|
}); //重新载入
|
var jsons = GetSearchEnd();
|
if (jsons == false) {
|
msg.info("请录入查询条件");
|
return false;
|
}
|
LoadGrid(jsons);
|
}
|
|
|
|
var _pageZhuanyi = function () {
|
$.ajax({
|
type: "GET",
|
url: "/Liaotian/Zhuanyi",
|
dataType: "json",
|
global: false,
|
data: '',
|
success: function (data) {
|
|
|
if (data.Result) {
|
// parent._afterSave(true);
|
parent.layer.msg('转移成功', { icon: 6 });
|
|
}
|
else {
|
|
parent.layer.msg('转移失败', { icon: 5 });
|
}
|
|
},
|
error: function () {
|
if ($.isNumber(imgLoad)) {
|
layer.close(imgLoad);
|
}
|
|
|
parent.layer.msg('转移失败', { icon: 5 });
|
}
|
});
|
}
|
|
var _pagePrint = function () {
|
|
var Questiontype1 = $("#PBSQuestiontype").val();
|
var Problemtype1 = $("#PBSProblemtype").val();
|
if (Verify.isNull($("#PBSQuestiontype").val())) {
|
toastr.warning("问题类别不能为空");
|
return;
|
}
|
if (Verify.isNull($("#PBSProblemtype").val())) {
|
toastr.warning("题目类别为空");
|
return;
|
}
|
var Question1 = $("#PBSQuestion").val();
|
var url = "/Liaotian/print?Questiontype=" + Questiontype1 + "&Problemtype=" + Problemtype1 + "&Question=" + Question1;
|
var me = window.open(url, "打印"); //打开新窗口
|
|
|
}
|
|
var _afterSave = function (result) {
|
if (result) {
|
toastr.success("保存成功");
|
} else {
|
toastr.error("保存失败");
|
}
|
}
|
|
var _afterDel = function (result) {
|
if (result) {
|
toastr.success("删除成功");
|
} else {
|
/**/
|
toastr.error("删除成功");
|
/**/
|
}
|
}
|
</script>
|
}
|
|
@section footerScripts{
|
<script type="text/javascript">
|
|
function send() {
|
|
var msg = $("#PBSQuestiontype");
|
|
|
if (msg.length > 0) {
|
$("#PBSQuestiontype").change(function () {
|
var city = $("#PBSQuestiontype").val();
|
$.ajax({
|
type: "GET",
|
url: "/Liaotian/gettimu?wentileibie=" + city,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var city = $("#PBSProblemtype");
|
city.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true"> </option>';
|
city.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeSn + '" hassubinfo="true">' + data[i].Comments + '</option>';
|
city.append(o);
|
}
|
}
|
$("#PBSProblemtype").trigger('chosen:updated');//更新选项
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
} else {
|
setTimeout(send, 1000);
|
}
|
}
|
|
|
|
|
|
//function sendHuidaStatus() {
|
|
// var msg = $("#PBSShifoushenhe");
|
|
|
// if (msg.length > 0) {
|
// $("#PBSShifoushenhe").val("D");
|
// $("#PBSShifoushenhe").trigger('chosen:updated');//更新选项
|
// //_pageSearch();
|
// } else {
|
// setTimeout(sendHuidaStatus, 1000);
|
// }
|
//}
|
//sendHuidaStatus();
|
send();
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
//setTimeout(
|
// function () {
|
$("#PBSShifoushenhe").val("D");
|
$("#PBSShifoushenhe").trigger('chosen:updated');//更新选项
|
// _pageSearch();
|
//}, 2000);
|
|
|
});
|
|
|
|
|
</script>
|
}
|