@{
|
ViewBag.Title = "Expert";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
}
|
@section headerStyle{
|
<script type="text/javascript">
|
|
|
var expertType = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.expertType))';
|
var Province = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Province))';
|
var level = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.level))';
|
|
dataCol = [
|
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
|
|
{
|
label: '姓名', name: 'Name', labtype: 'txt', hidden: false,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/expert/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>";
|
}
|
},
|
{ label: '专家证号', name: 'CertiNumber', labtype: 'txt', hidden: false },
|
{ label: '主要评审品目', name: 'ReviewItem', labtype: 'txt', hidden: false },
|
{ label: '专家等级', name: 'Level', labtype: 'txt', hidden: false },
|
{ label: '联系电话', name: 'Phone1', labtype: 'txt', hidden: false },
|
{ label: '合作次数', name: 'Level', labtype: 'txt', hidden: true },
|
{
|
label: '专家证', name: 'CertiFont', align: "center", sortable: false, editable: true,// labtype: 'txt', hidden: false
|
formatter: function (cellvalue, options, rowObject) {
|
return '<img src="' + rowObject.CertiFont + '" style="width:50px;height:30px;" />' +
|
'<img src="' + rowObject.CertiBack + '" style="width:50px;height:30px;" />';
|
}
|
},
|
{
|
label: '职称证', name: 'TitileCerti', align: "center", sortable: false, editable: true, //labtype: 'txt', hidden: false,
|
formatter: function (cellvalue, options, rowObject) {
|
// return '<img src="' + cellvalue + '" style="width:50px;height:30px;" />';
|
return '<img src="' + rowObject.TitileCerti + '" style="width:50px;height:30px;" />';
|
}
|
},
|
{
|
label: '合作记录', name: 'RecStatus', align: "center", align: "center", sortable: false, labtype: 'txt',
|
formatter: function (cellvalue, options, rowObject) {
|
return '<a href="javascript:void(0)" onclick="Promote(\'' + rowObject.Id + '\');"> <span style="background: #ECF3FF;"> 推广 </span> </a > '
|
+ ' <a href="javascript:void(0)" onclick="PromoteRecord(\'' + rowObject.Id + '\');"> <span style="background: #ECF3FF;"> 记录 </span></a>'
|
}
|
},
|
|
// { label: '操作', name: '', labtype: 'txt', hidden: false },
|
|
{ label: '状态', name: 'RecStatus', labtype: 'txt', hidden: true },
|
{ label: '创建人', name: 'Creater', labtype: 'txt', hidden: true },
|
{ label: '创建时间', name: 'Createtime', labtype: 'txt', hidden: true },
|
{ label: '修改人', name: 'Modifier', labtype: 'txt', hidden: true },
|
{ label: '修改时间', name: 'Modifytime', labtype: 'txt', hidden: true }
|
|
];
|
dataUrl = "/Expert/GetList";
|
searchCol = [
|
{ label: '录入时间', name: 'Createtime', labtype: 'datearea', hidden: false },
|
{ label: '省', name: 'Province', labtype: 'combox', hidden: false, data: JSON.parse(Province), cwidth: '5%', cccwidth: '6.5%' },
|
{ label: '市', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '7%' },
|
{ label: '专家姓名', name: 'Name', labtype: 'txt', hidden: false },
|
{ label: '专家类型', name: 'ExpertType', labtype: 'combox', hidden: false, data: JSON.parse(expertType)/*,cwidth: '5%', cccwidth: '28%' */ },
|
{ label: '评审品目', name: 'ReviewItem', labtype: 'txt', hidden: false },
|
{ label: '专家级别', name: 'Level', labtype: 'combox', hidden: false, data: JSON.parse(level) },
|
{ label: '专家证号', name: 'CertiNumber', labtype: 'txt', hidden: false },
|
{ label: '联系电话', name: 'Phone1', labtype: 'txt', hidden: false },
|
{ label: '合作次数>=', name: 'JoinCount', labtype: 'txt', hidden: false }
|
];
|
|
var _pageAdd = function () {
|
OpenWindow("新增专家", "98%", "90%", "/Expert/Edit/");
|
}
|
|
//新增推广记录
|
function Promote(id) {
|
OpenWindow("推广记录", "400px", "300px", "/Expert/EditPromote/?experId="+ id);
|
}
|
|
//推广记录
|
function PromoteRecord(id) {
|
// window.location.href = "/ExpertPromote/Index/?experId=" + id;
|
OpenWindow("推广记录", "98%", "90%", "/Expert/Promote/?experId=" + id);
|
}
|
var _afterSave = function (result) {
|
if (result) {
|
toastr.success("保存成功");
|
} else {
|
toastr.error("保存失败");
|
}
|
}
|
|
var _afterDel = function (result) {
|
if (result) {
|
toastr.success("删除成功");
|
} else {
|
/**/
|
toastr.error("删除成功");
|
/**/
|
}
|
}
|
|
|
$(function () {
|
$("#PBSProvince").change(function () {
|
let Province = $("#PBSProvince").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getCity?shengid=" + Province,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var city = $("#PBSCity");
|
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].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
city.append(o);
|
}
|
}
|
$("#PBSCity").trigger('chosen:updated');//更新选项
|
},
|
error: function () { }
|
});
|
});
|
|
|
});
|
</script>
|
}
|