tijian_tieying/web/dccdc/Views/Infection/InformationAudit.cshtml

379 lines
14 KiB
Plaintext
Raw Normal View History

2025-02-20 12:14:39 +08:00

@model dccdc.Models.InfectionOpenUserInfoModel
@{
ViewBag.Title = "个人信息审核";
}
<table class="t1" style="width:100%">
<tr>
@*<td class="ltd" style="width:100px">筛选条件:</td>
<td class="rtd" style="width:160px"><input type="text" class="l-text" style="width:140px" id="filtrate" /></td>
<td class="rtd"><input type="button" value="查询" class="l-button" id="cx" /></td>*@
<td class="ltd" style="width:10%">姓名:</td>
<td class="rtd" style="width:12%"><input id="gzListName" class="l-text" /></td>
<td class="ltd" style="width:10%">单位:</td>
<td class="rtd" style="width:12%"><input id="gzListUnit" class="l-text" /></td>
<td class="ltd" style="width:10%">电话:</td>
<td class="rtd" style="width:12%"><input id="gzListPhone" class="l-text" /></td>
<td class="ltd" style="width:10%">身份证:</td>
<td class="rtd" style="width:12%"><input id="gzListIdent" class="l-text" /></td>
<td class="rtd"><div id="search">查询</div></td>
</tr>
</table>
<div id="bzuser" style="">
@*<input type="button" value="添加" class="l-button" id="add" />
<input type="button" value="问卷" class="l-button" id="wj" />
<input type="button" value="修改" class="l-button" id="edit" />
<input type="button" value="详情" class="l-button" id="details" />*@
@*<input type="button" value="审核通过" class="l-button" id="audit_pass" />
<input type="button" value="审核不通过" class="l-button" id="audit_nopass" />*@
</div>
<div id="gzList"></div>
<table class="t1" style="width:100%">
<tr>
<td class="ltd" style="width:10%">审核通过(月):</td>
<td class="rtd" style="width:12%"><input id="monthOne" class="l-text" value="@ViewBag.monthPass" readonly/></td>
<td class="ltd" style="width:10%">审核驳回(月):</td>
<td class="rtd" style="width:12%"><input id="monthTwo" class="l-text" value="@ViewBag.monthRefuse" readonly/></td>
<td class="ltd" style="width:10%">审核通过(总):</td>
<td class="rtd" style="width:12%"><input id="allOne" class="l-text" value="@ViewBag.allPass" readonly/></td>
<td class="ltd" style="width:10%">审核驳回(总):</td>
<td class="rtd" style="width:12%"><input id="allTwo" class="l-text" value="@ViewBag.allRefuse" readonly/></td>
</tr>
</table>
<div id="PassArea" style="display:none">
<table class="t1" style="width:100%">
<tr>
<td class="rtd">是否确定通过?</td>
</tr>
</table>
</div>
<div id="RebutArea" style="display:none">
<table class="t1" style="width:100%">
<tr>
<td class="ltd" style="width:30%">驳回理由:</td>
<td class="rtd" style="width:70%"><input type="text" id="RebutReason" style="width:250px" /></td>
</tr>
</table>
</div>
@section scripts{
<script type="text/javascript">
function init() {
liger.get("gzList").reload();
$("#gzList").ligerDateEditor();
openf.close();
}
$(function () {
$("#search").ligerButton({
click: function () {
liger.get("gzList").set("parms", { name: $("#gzListName").val(), unit: $("#gzListUnit").val(), phone: $("#gzListPhone").val(), ident: $("#gzListIdent").val() });
liger.get("gzList").changePage("first");
liger.get("gzList").reload();
}
});
$("#gzList").ligerGrid({
title: "个人信息审核",
parms: {},
url: "@Url.Action("getData_InformationAudit")",
columns: [
{ name: "name", display: "姓名", width: 100, align: "left" }
, { name: "nickname", display: "昵称", width: 100, align: "left" }
, { name: "unit", display: "单位", width: 100, align: "left" }
, { name: "phone", display: "电话", width: 100, align: "left" }
, { name: "ident", display: "身份证", width: 200, align: "left" }
, {
name: "type", display: "当前状态", width: 80, align: "left", render: function (r, i, v) {
if (v == 0) {
return "未审核";
}
else if (v == 1) {
return "通过";
} else {
return "未通过";
}
}
}
, { name: "oa_trueName", display: "审核人", width: 100, align: "left" }
, { name: "pass_time", display: "审核时间", width: 100, align: "left" },
{ name: "recommend", display: "我的推荐码", width: 100, align: "left" },
{ name: "referee", display: "推荐码", width: 100, align: "left" },
{
name: "recommendCount", display: "推荐人数", width: 100, align: "left", render: function (r, i, v) {
if (v == null) {
return "0";
}
if (v > 0) {
return v + "";
}
else {
return "0";
}
}
},
{
name: "state", display: "当前状态", width: 150, align: "left", render: function (r, i, v) {
if (v == null|| v == 0) {
return "未录入";
}
if (v == 1) {
return "待审核";
}
if (v == 2) {
return "待问卷调查";
}
else if (v == 3) {
return "可体检预约";
}
else if (v==4)
{
return "已体检预约";
}
else
{
return "已体检";
}
}
},
], width: "98%",
height: "100%",
rownumbers: true,
usePager: true,
toolbar: {
items: [
//{ text: '问卷', click: wj, icon: 'add' },
//{ line: true },
{ text: '添加', click: add, icon: 'add' },
{ line: true },
{ text: '修改', click: edit, icon: 'edit' },
{ line: true },
{ text: '详情', click: details, icon: 'edit' },
{ line: true },
{ text: '通过', click: audit_pass, icon: 'edit' },
{ line: true },
{ text: '驳回', click: audit_nopass, icon: 'edit' },
{ line: true },
{ text: '新增预约', click: addInfection, icon: 'add' },
{ line: true },
{ text: '发送红包', click: SendRedPack, icon: 'add' },
{ line: true }
]
},
heightDiff: -40
});
$("#cx").bind("click", function () {
liger.get("gzList").set("parms", { filtrate: $("#filtrate").val() });
liger.get("gzList").set("page", 1);
liger.get("gzList").reload();
});
});
@*//添加
$("#add").click(function () {
openf = $.ligerDialog.open({
url: "@Url.Action("InformationAuditModify")",
title: "个人信息添加",
width: 800,
height: 600
});
});*@
//添加
function add()
{
openf = $.ligerDialog.open({
url: "addOpenUserInfoQuery",
title: "添加用户",
width: 800,
height: 800
});
}
//新增预约
function addInfection() {
var r = liger.get("gzList").getSelectedRow();
if (!r) {
$.ligerDialog.warn("请选择用户!");
return;
}
if (r.type == '0' || r.type == '2') { // 判断审核状态
$.ligerDialog.warn("用户未通过审核!");
return;
}
if (r.isQuestion == '1' && r.isNotQuestionnaire <= 0) { //判断问卷调查情况
$.ligerDialog.warn("请先填写调查问卷!");
return;
}
openf = $.ligerDialog.open({
url: "PhysicalExaminationAdd?name=" + r.name + "&ident=" + r.ident,
title: "新增预约",
width: 350,
height: 300
});
}
//问卷
function wj() {
var r = liger.get("gzList").getSelectedRow();
if (!r) {
$.ligerDialog.warn("请选择用户!");
return;
}
var userId = r.id;
openf = $.ligerDialog.open({
url: "@Url.Action("InformationAuditWJ")?id="+userId,
title: "问卷调查",
width: 1000,
height: 600
});
}
//发送红包
function SendRedPack() {
var r = liger.get("gzList").getSelectedRow();
if (!r) {
$.ligerDialog.warn("请选择用户!");
return;
}
var openid = r.openid;
var id = r.id;
openf = $.ligerDialog.open({
url: "@Url.Action("sendRedPackView")?openid=" + openid + "&id=" + id,
title: "发送红包",
width: 300,
height: 550
});
}
//详情
function details() {
var r = liger.get("gzList").getSelectedRow();
if (!r)
{
$.ligerDialog.warn("请选择用户!");
return;
}
openf = $.ligerDialog.open({
url: "@Url.Action("InformationAuditDetails")?id=" + r.id,
title: "个人信息审核详情",
width: 800,
height: 800
});
}
//修改
function edit() {
var r = liger.get("gzList").getSelectedRow();
if (!r)
{
$.ligerDialog.warn("请选择需要操作的数据!");
return;
}
openf = $.ligerDialog.open({
url: "@Url.Action("InformationAuditModify")?id=" + r.id,
title: "个人信息修改",
width: 800,
height: 800
});
}
function audit_pass()
{
var r = liger.get("gzList").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要审核的数据!");
return;
}
var id = r.id;
var type = 1;
$.ligerDialog.open({
target: $("#PassArea"),
title: '审核',
width: 380,
height: 150,
isResize: true,
modal: true,
buttons: [{
text: '确定', onclick: function (i, d) {
//方法功能自定义填写还可以有个button如OK Cancel,Close等只需用{}追加即可。
ToExamine(id, 1, '', '');
d.hidden();
}
}, {
text: '关闭', onclick: function (i, d) {
d.hidden();
}
}]
});
}
function audit_nopass()
{
var r = liger.get("gzList").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要驳回的数据!");
return;
}
var id = r.id;
var type = 2;
$.ligerDialog.open({
target: $("#RebutArea"),
title: '驳回',
width: 380,
height: 150,
isResize: true,
modal: true,
buttons: [{
text: '确定', onclick: function (i, d) {
if ($("#RebutReason").val() == null || $("#RebutReason").val() == "" ) {
$.ligerDialog.alert("请输入驳回理由!");
return;
}
//方法功能自定义填写还可以有个button如OK Cancel,Close等只需用{}追加即可。
ToExamine(id, 2, $("#RebutReason").val(), '');
d.hidden();
}
}, {
text: '关闭', onclick: function (i, d) {
d.hidden();
}
}]
});
}
function ToExamine(id, type, reason, pass_by)
{
$.ajax({
url: '@Url.Action("audit")',
data: { "id": id, "type": type, "reason": reason,"pass_by":pass_by},
type: 'post',
cache: false,
dataType: 'json',
success: function (data) {
if (data.State == 1) {
$.ligerDialog.alert("通过成功!");
} if (data.State == 0) {
$.ligerDialog.alert("更新失败,请联系管理员!");
}
if(data.State == 2) {
$.ligerDialog.alert("驳回成功!");
}
liger.get("gzList").set("parms", { name: $("#gzListName").val(), unit: $("#gzListUnit").val(), phone: $("#gzListPhone").val(), ident: $("#gzListIdent").val() });
liger.get("gzList").reload();
}
});
}
</script>
}