ComplianceServer/oldcode/Core.Web/Views/StockPools/Index.cshtml

157 lines
5.6 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.

@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;
}
</style>
<div class="x-body">
<div class="layui-btn-group" style="padding-bottom:10px;">
</div>
<div id="mytoolbar">
股票名称:
<div class="layui-inline">
<input type="text" name="txt_StockName" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
</div>
股票代码:
<div class="layui-inline">
<input type="text" name="txt_StockCode" placeholder="请输入" autocomplete="off" class="layui-input" style="width:120px;">
</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_ChosenDateStart" id="xstart" style="width:120px;" autocomplete="off" >
</div>
<div class="layui-inline">
<input class="layui-input" placeholder="截止日" name="txt_ChosenDateEnd" id="xend" style="width:120px;" autocomplete="off" >
</div>
股票状态:
<div class="layui-inline">
<select name="txt_Status" style="height:35px;">
<option value="">请选择</option>
<option value="0">正常</option>
<option value="1">禁用</option>
</select>
</div>
<button class="layui-btn" data-type="reload">搜索</button>
</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('laydate', function () {
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({ elem: '#start' });
//执行一个laydate实例
laydate.render({ elem: '#end' });
laydate.render({ elem: '#xstart' });
laydate.render({ elem: '#xend' });
laydate.render({ elem: '#kstart' });
laydate.render({ elem: '#kend' });
laydate.render({ elem: '#aistart' });
laydate.render({ elem: '#aiend' });
});
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: '/StockPools/Index',
method: 'POST',
even: true, //开启隔行背景
cols: [[
//{ type: 'checkbox' }
//,
{ field: '', title: '序号', width: 80, type: 'numbers', fixed: true }
,{ field: 'StockName', title: '股票名称' }
, { field: 'StockCode', title: '股票代码'}
, { field: 'InduName', title: '所属行业' }
, { field: 'ChosenDate', title: '入选时间' }
, { field: 'ChosenPrice', title: '入池价格' }
, { field: 'Price', title: '最新价' }
, { field: 'ZdRatio', title: '今日涨幅' }
, { field: 'ChosenType', title: '入池方式', templet: '#chosenTypeTpl' }
, { field: 'StatusName', title: '状态' }
, { field: 'Operator', title: '操作人' }
, { field: 'UpdateTime', title: '更新时间' ,width:180}
//, { field: 'call', title: '操作', templet: '#callTpl', fixed: 'right', width: 60 }
]]
,
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
});
});
//监听行单击事件
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;
});
});
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) : '';
});
});
</script>
<script type="text/html" id="chosenTypeTpl">
<div class="setTime" style="display:flex">
{{# if(d.ChosenType == 0) { }}
自动
{{# } else { }}
手动
{{# } }}
</div>
</script>