You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

310 lines
14 KiB
Plaintext

10 months ago
<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Dispatch/Views/Shared/PC.Master" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Body" runat="server">
<div class="ibox-content">
<div class="row row-lg">
<div class="col-sm-12">
<div id="toolbar">
<div class="form-inline" role="form">
<div class="form-group">
<span>审核状态: </span>
<select id="selectSearchStatus" class="form-control">
<option value="">全部</option>
<option value="NotIndent">未提交</option>
<option value="Identifying" selected>待审核</option>
<option value="Indentified">已审核</option>
<option value="Reject">已驳回</option>
</select>
</div>
<button id="btnSearch" type="button" class="btn btn-primary">查询</button>
</div>
</div>
<table id="table"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="true"
data-toolbar="#toolbar"
data-url="/Dispatch/Booking/AuditList"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="Data"
data-page-number="1"
data-page-size="15"
data-query-params="queryParams"
data-method="post">
<thead>
<tr>
<th data-field="NAME">姓名</th>
<th data-field="TEL">固话</th>
<th data-field="MOBILE">手机</th>
<th data-field="EMAIL">邮箱</th>
<th data-field="COMPANY_NAME">公司名称</th>
<th data-field="COMPANY_CODE">企业信用代码</th>
<%--<th data-field="ADDRESS">办公地址</th>--%>
<th data-field="IDENTIFICATION_STATE_STR">审核状态</th>
<th data-field="STATUS_STR">账号状态</th>
<th data-field="REG_TIME">注册时间</th>
<th data-field="INFO_CLIENT">关联客户</th>
<th data-field="REMARK">备注</th>
<th data-field="Gid" data-formatter="operateFormatter" data-events="operateEvents">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="auditModel" tabindex="-1" role="dialog" aria-labelledby="auditModelTitle">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="auditModelTitle">审核</h4>
</div>
<div class="modal-body">
<form>
<input type="hidden" id="modelInputGID" />
<div class="form-group">
<label>公司名称</label>
<input class="form-control" type="text" id="modelInputCompName" readonly />
</div>
<div class="form-group">
<label>企业信用代码</label>
<input class="form-control" type="text" id="modelInputCompCode" readonly />
</div>
<div class="form-group">
<label>公司地址</label>
<input class="form-control" type="text" id="modelInputCompAddr" readonly />
</div>
<div class="form-group">
<label>营业执照</label>
<button type="button" class="btn btn-primary btn-sm" id="modelBtnViewImage">查看图片</button>
</div>
<div class="form-group">
<label>选择委托单位</label>
<div class="input-group">
<input type="text" class="form-control" id="modelInputInfoClient" autocomplete="off">
<div class="input-group-btn">
<button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
</ul>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="modelBtnSubmit">通过</button>
<button type="button" class="btn btn-danger" id="modelBtnReject">驳回</button>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="imgModel" tabindex="-1" role="dialog" aria-labelledby="imgModelTitle">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="imgModelTitle">查看营业执照</h4>
</div>
<div class="modal-body">
<img src="" id="companyImg" style="overflow: scroll;" />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FooterScript" runat="server">
<script src="/Areas/Dispatch/Content/Dispatch/hplus/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<%
string bookingPlatformUrl = ViewData["BookingPlatformUrl"].ToString();
%>
<script>
var bsSuggest;
$(function () {
$('#table').bootstrapTable({ height: $(window).height() - 150 });
$("#btnSearch").click(function () {
$('#table').bootstrapTable('refresh')
})
$("#modelBtnSubmit").on("click", function () {
layer.confirm('确定审核通过吗?', {
btn: ['确定', '取消']
}, function () {
var gid = $("#modelInputGID").val();
var infoClient = $("#modelInputInfoClient").val();
if (infoClient.length == 0) {
layer.alert('请选择委托单位')
return;
}
$.ajax({
type: "POST",
url: "/Dispatch/Booking/Audit",
dataType: "json",
data: "uid=" + gid + "&infoClient=" + infoClient,
success: function (data) {
layer.alert(data.Message, function (index) {
$('#auditModel').modal('hide');
$('#table').bootstrapTable('refresh')
layer.close(index);
});
}
});
});
});
$("#modelBtnReject").on("click", function () {
layer.confirm('确定驳回吗?', {
btn: ['确定', '取消']
}, function () {
var gid = $("#modelInputGID").val();
var infoClient = $("#modelInputInfoClient").val();
$.ajax({
type: "POST",
url: "/Dispatch/Booking/Reject",
dataType: "json",
data: "uid=" + gid,
success: function (data) {
layer.alert(data.Message, function (index) {
$('#auditModel').modal('hide');
$('#table').bootstrapTable('refresh')
layer.close(index);
});
}
});
});
});
bsSuggest = $("#modelInputInfoClient").bsSuggest('init', {
url: "/Dispatch/Common/GetControllerInfoClients?keyword=",
getDataMethod: "url",
clearable: true,
idField: "GID",
keyField: "SHORTNAME",
effectiveFields: ["CODENAME", "SHORTNAME"],
effectiveFieldsAlias: { CODENAME: "编码", SHORTNAME: "简称" },
showHeader: true,
showBtn: false,
clearable: true
});
$("#modelBtnViewImage").click(function () {
var imgUrl = '<%=bookingPlatformUrl%>/user/ViewIdentifyImg.aspx?uid=' + $("#modelInputGID").val();
$("#companyImg").attr("src", imgUrl)
$('#imgModel').modal('show');
});
})
function queryParams(params) {
params.identSta = $("#selectSearchStatus").val();
return params
}
function operateFormatter(value, row, index) {
if (row.IDENTIFICATION_STATE == "Identifying") {
return [
'<a class="audit" href="javascript:void(0)" title="审核">',
'<i class="fa fa-edit"></i>审核',
'</a>'
].join('');
} else if (row.IDENTIFICATION_STATE == "Indentified") {
return [
'<a class="enable" href="javascript:void(0)" title="启用">',
'<i class="fa fa-check"></i>启用',
'</a> ',
'<a class="disable" href="javascript:void(0)" title="禁用">',
'<i class="fa fa-times"></i>禁用',
'</a> ',
'<a class="audit" href="javascript:void(0)" title="查看">',
'<i class="fa fa-edit"></i>查看',
'</a>'
].join('');
} else {
return '';
}
}
window.operateEvents = {
'click .audit': function (e, value, row, index) {
$("#modelInputGID").val(row.GID);
$("#modelInputCompName").val(row.COMPANY_NAME);
$("#modelInputCompCode").val(row.COMPANY_CODE);
$("#modelInputCompAddr").val(row.ADDRESS);
$("#modelInputInfoClient").val(row.INFO_CLIENT);
$('#auditModel').modal('show');
if (row.IDENTIFICATION_STATE != "Identifying") {
$("#modelBtnSubmit").hide();
$("#modelInputInfoClient").bsSuggest("disable")
} else {
$("#modelBtnSubmit").show();
$("#modelInputInfoClient").bsSuggest("enable")
}
},
'click .enable': function (e, value, row, index) {
layer.confirm('确定启用?', function (index) {
$.ajax({
type: "POST",
url: "/Dispatch/Booking/SetActive",
data: "uid=" + row.GID + "&active=true",
success: function (data) {
layer.alert(data.Message, function (index) {
$('#table').bootstrapTable('refresh')
layer.close(index);
});
}
});
layer.close(index);
});
},
'click .disable': function (e, value, row, index) {
layer.confirm('确定禁用?', function (index) {
$.ajax({
type: "POST",
url: "/Dispatch/Booking/SetActive",
data: "uid=" + row.GID + "&active=false",
success: function (data) {
layer.alert(data.Message, function (index) {
$('#table').bootstrapTable('refresh')
layer.close(index);
});
}
});
layer.close(index);
});
},
'click .viewImg': function (e, value, row, index) {
var imgUrl = '<%=bookingPlatformUrl%>/user/ViewIdentifyImg.aspx?uid=' + row.GID;
$("#companyImg").attr("src", imgUrl)
$('#imgModel').modal('show');
}
}
</script>
</asp:Content>