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.
DS7/BookingJieFeng/Views/Log/LogView.cshtml

159 lines
6.6 KiB
Plaintext

2 years ago
@{
}
<div class="wrapper-content J_mainContent gray-bg-right">
<div class="row">
<div class="ibox">
<div class="ibox-title">
<h5>操作日志</h5>
</div>
<div class="ibox-content">
<form class="form-horizontal" id="formCond">
<!--<label class="col-lg-2 col-md-2 control-label">@Resources.LangAll.LabelMBLNO</label>-->
<div class="col-lg-2 col-md-2">
<input type="text" class="form-control" name="MBLNO" placeholder="@Resources.LangAll.LabelMBLNO" />
</div>
<!--<label class="col-lg-2 col-md-2 control-label">@Resources.LangLog.LabelDateRange</label>-->
<div class="col-lg-2 col-md-2">
<input type="text" class="form-control date" name="DATE_START" id="DATE_START" placeholder="起始时间" />
</div>
<div class="col-lg-2 col-md-2">
<input type="text" class="form-control date" name="DATE_END" id="DATE_END" placeholder="结束时间" />
</div>
<div class="form-group col-md-2">
<a class="btn btn-resect" id="btn-reset">重置</a>
<a class="btn btn-query" id="btnSearch">查询</a>
</div>
</form>
<table id="table"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("LogData")"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="DataList"
data-page-number="1"
data-page-size="15"
data-query-params="queryParams"
data-method="post">
<thead>
<tr>
<th data-field="MBLNO">@Resources.LangAll.LabelMBLNO</th>
<th data-field="OpUserName">@Resources.LangLog.LabelOpUserName</th>
<th data-field="OpCompanyName">@Resources.LangLog.LabelOpCompanyName</th>
<th data-field="Module">@Resources.LangLog.LabelModule</th>
<th data-field="Type">@Resources.LangLog.LabelType</th>
<th data-field="OpTime">@Resources.LangLog.LabelOpTime</th>
<th data-field="LogId" data-formatter="operateFormatter">@Resources.LangAll.LabelOPERATE</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<div class="modal fade" id="changeModal" tabindex="-1" role="dialog" aria-labelledby="changeModalLabel">
<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="changeModalLabel">@Resources.LangLog.BtnViewChange</h4>
</div>
<div class="modal-body cleafix">
<table id="tableChange"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-content-type="application/x-www-form-urlencoded"
data-pagination="false"
data-method="post">
<thead>
<tr>
<th data-field="Title">@Resources.LangLog.LabelField</th>
<th data-field="SrcValue">@Resources.LangLog.LabelSrcValue</th>
<th data-field="DestValue">@Resources.LangLog.LabelDestValue</th>
</tr>
</thead>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">@Resources.LangAll.BtnClose</button>
</div>
</div>
</div>
</div>
@section styles
{
<link type="text/css" rel="stylesheet" href="~/Content/css/orderlist.css" />
<link type="text/css" rel="stylesheet" href="~/Content/css/logview.css" />
}
@section scripts{
<script>
$(function () {
$("#btn-reset").click(function () {
$(".form-horizontal input").val('');
});
$('#table').bootstrapTable();
$('#tableChange').bootstrapTable();
$("#btnSearch").click(function () {
$('#table').bootstrapTable('refresh')
})
$('#DATE_START,#DATE_END').datepicker({
autoclose: true,
format: "yyyy-mm-dd"
});
})
function queryParams(params) {
var cond = $("#formCond").serializeObject();
params.DATE_START = cond.DATE_START;
params.DATE_END = cond.DATE_END;
params.MBLNO = cond.MBLNO;
return params
}
function operateFormatter(value, row, index) {
return [
'<a class="viewChg" onclick="viewChange(' + row.LogId + ')">',
'<i class="fa fa-eye"></i>@Resources.LangLog.BtnViewChange',
'</a>'
].join('');
}
function viewChange(logid) {
var idx=layer.load();
var url = '@Url.Action("ChangeData")?logId=' + logid;
$.ajax({
method: 'POST',
url: url,
dataType: 'json',
success: function (data) {
layer.close(idx)
if (data.Success) {
if (data.ChangeList.length > 0) {
$("#changeModal").modal('show')
$('#tableChange').bootstrapTable('load', data.ChangeList);
} else {
layer.alert('@Resources.LangLog.MsgNoPropChange');
}
} else {
layer.alert(data.Message);
}
}
})
}
</script>
}