304 lines
12 KiB
Plaintext
304 lines
12 KiB
Plaintext
@using CRM.Core.Model.Entity
|
||
@using Core.Web.WebHelper
|
||
@{
|
||
/**/
|
||
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||
}
|
||
<style>
|
||
.self-table-click td {
|
||
background-color: #f3ebbc;
|
||
}
|
||
|
||
.showMsg {
|
||
margin-left: 20px;
|
||
cursor: pointer;
|
||
}
|
||
.layui-inline {
|
||
display: flex;
|
||
margin-top: 10px;
|
||
margin-right: 10px;
|
||
align-items: center;
|
||
}
|
||
.layui-form {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
}
|
||
</style>
|
||
<div class="x-body">
|
||
<div class="layui-btn-group" style="padding-bottom:10px;">
|
||
</div>
|
||
<div id="mytoolbar" class="layui-form">
|
||
<div class="layui-inline">
|
||
产品线:
|
||
<div id="selectPlatformIds" style="width: 400px"></div>
|
||
</div>
|
||
|
||
<div class="layui-inline">
|
||
股票名称:
|
||
<input type="text" name="txt_StockName" placeholder="请输入" autocomplete="off" class="layui-input" style="width: 200px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
股票代码:
|
||
<input type="text" name="txt_StockCode" placeholder="请输入" autocomplete="off" class="layui-input" style="width: 200px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
栏目名:
|
||
<input type="text" name="txt_SubjectName" placeholder="请输入" autocomplete="off" class="layui-input" style="width:200px;">
|
||
</div>
|
||
<div class="layui-inline">
|
||
股票所属行业:
|
||
<select name="txt_InduName" style="height:35px;">
|
||
<option value="">全部</option>
|
||
@foreach (var item in ViewBag.InduList as List<SelectListItem>)
|
||
{
|
||
<option value="@item.Text">@item.Text</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
<div class="layui-inline">
|
||
报备时间:
|
||
<input class="layui-input" placeholder="开始日" name="txt_BeginTime" id="start" style="width:150px; margin-right:10px;" autocomplete="off">-
|
||
<input class="layui-input" placeholder="截止日" name="txt_EndTime" id="end" style="width: 150px; margin-left: 10px;" autocomplete="off">
|
||
</div>
|
||
<div class="layui-inline">
|
||
流程状态:
|
||
<select name="txt_Checked" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="20">合规审核中</option>
|
||
<option value="10">专业审核中</option>
|
||
<option value="99">审核通过</option>
|
||
<option value="-1">审核驳回</option>
|
||
</select>
|
||
</div>
|
||
<div class="layui-inline">
|
||
在池状态:
|
||
<select name="txt_InPoolStatus" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="0">在池</option>
|
||
<option value="1">出池</option>
|
||
</select>
|
||
</div>
|
||
<div class="layui-inline">
|
||
报备方式:
|
||
<select name="txt_ReportType" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
<option value="1">人工报备</option>
|
||
<option value="2">自动报备</option>
|
||
</select>
|
||
</div>
|
||
<div class="layui-inline" style="display: flex; justify-content: flex-end;">
|
||
<button class="layui-btn" data-type="reload" style="width: 100px" id="search">
|
||
<i class="layui-icon layui-icon-search"></i>搜索
|
||
</button>
|
||
<button class="layui-btn layui-btn-normal" style="width: 100px" id="clear">
|
||
<i class="layui-icon layui-icon-delete"></i>清空
|
||
</button>
|
||
</div>
|
||
</div>
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
<iframe id="BillOpen" width="0" height="0" scrolling="no" frameborder="0" style="display:none;"></iframe>
|
||
</div>
|
||
<script>
|
||
var selectRow = {};
|
||
|
||
layui.use(['table', 'form', 'laydate'], function () {
|
||
var table = layui.table;
|
||
var form = layui.form;
|
||
var laydate = layui.laydate;
|
||
//执行一个laydate实例
|
||
laydate.render({ elem: '#start' });
|
||
//执行一个laydate实例
|
||
laydate.render({ elem: '#end' });
|
||
var param2 = GetParams("mytoolbar");
|
||
console.log("param2:" + param2);
|
||
table.render({
|
||
id: 'testReload',//列表别名ID
|
||
elem: '#tabl1',//表ID
|
||
url: '/StockReport/Page',
|
||
method: 'POST',
|
||
even: true, //开启隔行背景
|
||
cols: [[
|
||
//{ type: 'checkbox' }
|
||
//,
|
||
{ field: '', title: '序号', width: 80, type: 'numbers', fixed: true, align: 'center' }
|
||
, { field: 'CheckedStr', title: '流程状态', width: 120, fixed: true, align: 'center', templet: '#CheckedTpl' }
|
||
, { field: 'SubjectName', title: '栏目名', width: 120, align: 'center' }
|
||
, { field: 'StockName', title: '股票名称', width: 120, align: 'center' }
|
||
, { field: 'StockCode', title: '股票代码', width: 100, align: 'center' }
|
||
, { field: 'InduName', title: '所属行业', width: 120, align: 'center' }
|
||
, { field: 'Platform', title: '产品线', width: 100, align: 'center' }
|
||
, { field: 'FocusPrice', title: '建议关注价格', width: 120, templet: '#FocusPriceTpl', align: 'center' }
|
||
, { field: 'WarningPrice', title: '预警价格', width: 100, templet: '#WarningPriceTpl', align: 'center' }
|
||
, { field: 'RecommendStock', title: '建议仓位', width: 120, templet: '#RecommendStockTpl', align: 'center' }
|
||
, { field: 'RecommendReason', title: '建议理由', width: 120, align: 'center' }
|
||
, { field: 'CreateTime', title: '报备时间', width: 160, align: 'center' }
|
||
, { field: 'ReportTypeStr', title: '报备方式', width: 100, align: 'center' }
|
||
, { field: 'ReportUserName', title: '报备人', width: 120, align: 'center' }
|
||
, { field: 'PracticeNo', title: '报备人执业证书编号', width: 170, align: 'center' }
|
||
, { field: 'InPoolStatusStr', title: '在池状态', width: 120, align: 'center' }
|
||
, { field: 'CheckUserName', title: '合规审核人', width: 120, align: 'center' }
|
||
//, { field: 'CheckTime', title: '合规审核时间', width: 120, align: 'center' }
|
||
, { field: 'Log', title: '查看日志', width: 120, templet: '#LogTpl', fixed: 'right', width: 90, align: 'center' }
|
||
, { field: 'CheckOrder', title: '操作', templet: '#OperatorTpl', fixed: 'right', width: 120, align: 'center' }
|
||
// , { field: 'ContentTypeStr', title: '内容类型', width: 120 }
|
||
]]
|
||
, 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 #search').on('click', function (data) {
|
||
var param = GetParams("mytoolbar");
|
||
table.reload('testReload', {
|
||
page: {
|
||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh']
|
||
, curr: 1 //重新从第 1 页开始
|
||
},
|
||
where: param
|
||
});
|
||
});
|
||
|
||
//监听行单击事件
|
||
table.on('row(tabl1)', function (obj) {
|
||
var data = obj.data;
|
||
//console.log(data);
|
||
//标注选中样式
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
|
||
selectRow = data;
|
||
});
|
||
|
||
//清空
|
||
$("#clear").on('click', function (e) {
|
||
$("#mytoolbar input[type='text']").val("");
|
||
$("#mytoolbar select").val("");
|
||
form.render("select");
|
||
$("#start").val(""); //清空开始时间输入框
|
||
$("#end").val(""); //清空结束时间输入框
|
||
laydate.render({ elem: '#start' });
|
||
laydate.render({ elem: '#end' });
|
||
selectPlatform.reset();
|
||
allPlatform.forEach(function (item) {
|
||
item.selected = false;
|
||
})
|
||
selectPlatform = xmSelect.render(optionsPlatform);
|
||
selectPlatform.update({ data: allPlatform });
|
||
});
|
||
});
|
||
function checkpool(auditId, check) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '审核',
|
||
type: 2,
|
||
content: '/StockReport/Check?id=' + auditId + "&check=" + check,
|
||
area: ['50%', '70%']
|
||
});
|
||
});
|
||
}
|
||
function log(id) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '操作日志',
|
||
type: 2,
|
||
content: '/StockReport/Log?id=' + id,
|
||
area: ['60%', '70%']
|
||
});
|
||
});
|
||
}
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
|
||
$('.layui-btn-group .layui-btn').on('click', function () {
|
||
var othis = $(this), method = othis.data('method');
|
||
active[method] ? active[method].call(this, othis) : '';
|
||
});
|
||
});
|
||
|
||
var allPlatform = [{
|
||
name: '东方股票',
|
||
value: '1001'
|
||
},
|
||
{
|
||
name: '六合',
|
||
value: '1002'
|
||
},
|
||
{
|
||
name: '懂牛',
|
||
value: '1004'
|
||
},
|
||
{
|
||
name: '聚牛',
|
||
value: '1005'
|
||
},
|
||
{
|
||
name: '短线王',
|
||
value: '2001'
|
||
}]
|
||
var optionsPlatform = {
|
||
el: '#selectPlatformIds',
|
||
name: 'txt_platformId',//表单的name属性
|
||
layVerify: '',
|
||
tips: '请选择产品线',
|
||
layVerify: 'required',
|
||
toolbar: {//工具条,全选,清空,反选,自定义
|
||
show: true,
|
||
list: [
|
||
'CLEAR'
|
||
]
|
||
},
|
||
data: allPlatform,
|
||
};
|
||
var selectPlatform = xmSelect.render(optionsPlatform);
|
||
</script>
|
||
<script type="text/html" id="LogTpl">
|
||
<div class="setTime">
|
||
<a href="javascript:void(0)" onclick="log('{{d.Id}}')" style="color: #38cb35;">日志</a>
|
||
</div>
|
||
</script>
|
||
<script type="text/html" id="OperatorTpl">
|
||
{{# if(d.Checked == 20) { }}
|
||
<a href="javascript:void(0)" onclick="checkpool('{{d.Id}}',99)" style="color: #38cb35; margin-right: 20px;">审核</a>
|
||
<a href="javascript:void(0)" onclick="checkpool('{{d.Id}}',-1)" style="color: #38cb35;">驳回</a>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="CheckedTpl">
|
||
{{# if(d.Checked == 10) { }}
|
||
<div style="border-radius: 6px; background-color: #31BDEC; color: white">{{ d.CheckedStr }}</div>
|
||
{{# } else if(d.Checked == 20) { }}
|
||
<div style="border-radius: 6px; background-color: #FFB800; color: white ">{{ d.CheckedStr }}</div>
|
||
{{# } else if(d.Checked == 99) { }}
|
||
<div style="border-radius: 6px; background-color: #5FB878; color: white">{{ d.CheckedStr }}</div>
|
||
{{# } else { }}
|
||
<div style="border-radius: 6px; background-color: #FF5722; color: white ">{{ d.CheckedStr }}</div>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="FocusPriceTpl">
|
||
{{ d.FocusPriceFloor }}-{{ d.FocusPriceCeiling }}
|
||
</script>
|
||
<script type="text/html" id="RecommendStockTpl">
|
||
{{# if(d.RecommendStockPosition != "" && d.RecommendStockPosition > 0 ) { }}
|
||
{{ d.RecommendStockFloor }}% - {{ d.RecommendStockPosition }}%
|
||
{{# } else { }}
|
||
{{ d.RecommendStockFloor }}%
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="WarningPriceTpl">
|
||
{{ d.WarningPriceFloor }}-{{ d.WarningPriceCeiling }}
|
||
</script> |