ComplianceServer/oldcode/Core.Web/Views/StockReport/Log.cshtml

86 lines
3.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model CRM.Core.BLL.StockAuditOrRejectDto
@{
ViewBag.Title = "SetTime";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="x-body">
<div id="mytoolbar">
<input type="hidden" value="@ViewBag.Id" name="txt_id" id="id" />
</div>
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
</div>
<script>
layui.use(['table', 'form'], function () {
var table = layui.table;
var form = layui.form;
var param2 = GetParams("mytoolbar");
console.log("param2:" + param2);
table.render({
id: 'testReload',//列表别名ID
elem: '#tabl1',//表ID
url: '/StockReport/LogPage',
method: 'POST',
even: true, //开启隔行背景
cols: [[
//{ type: 'checkbox' }
//,
{ field: '', title: '序号', width: 80, type: 'numbers', fixed: true }
, { field: 'OperateTypeStr', title: '操作事项', width: 120 }
, { field: 'TriggerTypeStr', title: '触发类型' }
, { field: 'OperateResult', title: '操作结果', width: 120 }
, { field: 'OperateRemark', title: '操作说明' }
, { field: 'CreateName', title: '操作人姓名', width: 120 }
, { field: 'CreateTime', title: '操作时间', width: 180 }
//, { field: 'call', title: '操作', templet: '#callTpl', fixed: 'right', width: 60 }
]]
, parseData: function (res) { //res 即为原始返回的数据
return {
"code": res.Code == 200 ? 0 : res.Code, //解析接口状态
"msg": res.Msg, //解析提示文本
"count": res.Total, //解析数据长度
"data": res.Rows //解析数据列表
};
},
page: { //支持传入 laypage 组件的所有参数某些参数除外jump/elem - 详见文档
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
//,curr: 5 //设定初始在第 5 页
, groups: 5 //只显示 1 个连续页码
}
, where: param2
});
$('#mytoolbar .layui-btn').on('click', function (data) {
var param = GetParams("mytoolbar");
table.reload('testReload', {
page: {
curr: 1 //重新从第 1 页开始
},
where: param
});
});
});
$(function () {
layui.use('layer', function () {
var layer = layui.layer;
$("#save").click(function () {
var id = $("#id").val();
var remark = $("#AuditRemark").val();
var ischeck = $("#check").val();
$.r_post('/StockReport/Check', { id: id, remark: remark, check: ischeck }, function (result) {
if (result.result) {
@* layer.alert("操作成功!", {
yes: function () { parent.window.location.reload(); }
})*@
parent.window.location.reload();
} else {
layer.alert(result.retmsg);
}
});
});
});
});
</script>