123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
-
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>RptQUnitedCenterCheckData</title>
- <link href="~/easyui/themes/default/easyui.css" rel="stylesheet" />
- <link rel="stylesheet" type="text/css" href="~/easyui/themes/icon.css" />
- <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
- <link href="~/Content/js/plugins/layer/skin/layer.css" rel="stylesheet" />
- <script src="~/Content/js/jquery.min.js"></script>
- <script src="~/Content/js/bootstrap.min.js"></script>
- <script src="~/easyui/jquery.easyui.min.js"></script>
- <script src="~/easyui/jquery.easyui.mobile.js"></script>
- <script src="~/easyui/locale/easyui-lang-zh_CN.js"></script>
- <script src="~/Content/js/plugins/layer/laydate/laydate.js"></script>
- <script src="~/Content/js/plugins/layer/layer.min.js"></script>
- <script src="~/js/Utils.js"></script>
- <style>
- #Search_Panel .panel-header {
- height: 30px;
- padding-top: 8px;
- text-align: center;
- font-size: 14px;
- }
- #Search_Panel table.panel-table {
- width: 900px;
- }
- #Search_Panel td.td-label {
- width: 5%;
- text-align: right;
- padding: 3px 10px 3px 0;
- }
- #Search_Panel td.td-input {
- width: 10%;
- text-align: left;
- }
- #Search_Panel .td-input input,
- #Search_Panel .td-input select {
- width: 150px;
- height: 22px;
- }
- #Search_Panel .panel.easyui-fluid {
- margin-bottom: 5px;
- }
- </style>
- </head>
- <body>
- <section id="Search_Panel">
- <div id="" class="easyui-panel" title=""
- style="width: 100%; height: 120px; padding: 10px;"
- data-options="collapsible:true">
- <table class="panel-table">
- <tr>
- <td class="td-label"><label for="MarketNames">被检单位</label></td>
- <td class="td-input">
- <select class="easyui-combobox" style="height: 22px;width:200px" id="MarketNames" name="MarketNames" data-options="icons:[{
- iconCls:'icon-search_zoom',handler:function(){SearchModal()}
- }]">
- <option value="">请选择...</option>
- @Html.Raw(ViewBag.SelMarketInfo)
- </select>
- </td>
- <td class="td-label"><label for="StartTime">开始日期</label></td>
- <td class="td-input">
- <input class="laydate-icon layer-date" type="text" id="StartTime" name="StartTime" placeholder="" style="width:200px" value="@ViewBag.StartTime" />
- </td>
- <td class="td-label"><label for="EndTime">结束日期</label></td>
- <td class="td-input">
- <input class="laydate-icon layer-date" type="text" id="EndTime" name="EndTime" placeholder="" style="width:200px" value="@ViewBag.EndTime" />
- </td>
- </tr>
- <tr>
- <td class="td-label"><label for="CheckProjectTypeID">检测项目</label></td>
- <td class="td-input">
- <select class="easyui-combobox" style="height: 22px;width:200px" id="CheckProjectTypeID" name="CheckProjectTypeID" data-options="">
- <option value="">全部</option>
- @Html.Raw(ViewBag.SelCheckProjectTypeID)
- </select>
- </td>
-
- <td colspan="4" style="width: 6%;text-align: left;">
- <a class="easyui-linkbutton" id="Save_Search" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="btn_Query()" style="width:120px;margin-right:110px">显示打印结果</a>
- </td>
- </tr>
- </table>
- </div>
- </section>
- <section>
- <div id="winModal" class="easyui-window winModal" title="市场查询" style="width: 700px; height: 450px;padding:10px;"
- iconCls="icon-save" data-options="modal:true,closed:true">
- <div class="easyui-layout" data-options="fit:true" style="height:99%">
- <div data-options="region:'center'" style="padding:5px 5px 5px;">
- <table>
- <tr>
- <td style="padding-left:5px">辖区工商:</td>
- <td style="padding-left:5px">
- @*<input class="easyui-combotree" id="RegionID" data-options="url:/BaseInfo/GetTreeRegion',method:'post',required:true,loadFilter: function (rows) {
- return convert(rows);
- }" style="width:100px;" />*@
- <input class="easyui-combotree" id="RegionID" data-options="url:'/BaseInfo/GetTreeRegion',method:'post',loadFilter: function (rows) {
- return convert(rows);
- }" style="width:150px;height:20px" />
- </td>
- <td style="padding-left:5px">隶属市场:</td>
- <td style="padding-left:5px">
- <input class="easyui-textbox" id="MarketName" style="width:150px;height:20px" />
- </td>
- <td style="padding-left:5px"><a class="easyui-linkbutton" id="Save_Search" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="DgSearchLoadTable()" style="width:100px;height:20px">搜索</a></td>
- </tr>
- </table>
- <table id="dgTable_Search" class="easyui-datagrid" style="width: 98%; height: 285px;"
- data-options="singleSelect: true,
- method: 'post',
- multiSort: false,
- fitColumns: true,
- remoteSort: false,
- onDblClickRow: function () {
- SetSearch();
- }">
- <thead>
- <tr>
- <th data-options="field:'RegionID',width:50">区域编号</th>
- <th data-options="field:'Names',width:150,">市场名称</th>
- <th data-options="field:'Principal',width:60,">负责人</th>
- <th data-options="field:'LinkTel',width:60">联系电话</th>
- <th data-options="field:'LinkMan',width:60,">日常联系人</th>
- <th data-options="field:'FrontForUnit',width:120,">主办单位</th>
- <th data-options="field:'ManageUnit',width:100">管理单位</th>
- <th data-options="field:'PractiseTime',width:60,">开业时间</th>
- </tr>
- </thead>
- </table>
- </div>
- <div data-options="region:'south',border:false" style="text-align:right; padding: 10px 20px;height:52px">
- <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearch()" style="width:80px">确认</a>
- <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width:80px">取消</a>
- </div>
- </div>
- </div>
- </section>
- <script>
- function SearchModal() {
- $('#winModal').window({ "title": "搜索被检单位" });
- $('#MarketName').textbox('setValue',"")
- DgSearchLoadTable();
- $('#winModal').window('open');
- }
- function DgSearchLoadTable() {
- $('#dgTable_Search').datagrid({
- url: '/Reports/GetMarkets?RegionId=' + $('#RegionID').combotree('getValue') + '&&MarketName=' + $('#MarketName').textbox('getValue')
- })
- }
- function SetSearch() {
- var row = $('#dgTable_Search').datagrid('getSelected');
- if (row) {
- $('#MarketNames').combobox('setValue', row.MarketID);
- $('#winModal').window('close');
- }
- }
- function btn_Query() {
- window.open("/Reports/RptPUnitedCenterCheckData?MarketID=" + $('#MarketNames').combobox('getValue') + '&&StartTime=' + $('#StartTime').val() +
- '&&EndTime=' + $('#EndTime').val() + '&&CheckProjectTypeID=' + $('#CheckProjectTypeID').combobox('getValue'));
- }
- $(function () {
- //加载日历控件
- laydate({
- elem: '#StartTime',
- format: "YYYY-MM-DD",
- min: "2000-01-01",
- event: "focus"
- });
- //加载日历控件
- laydate({
- elem: '#EndTime',
- format: "YYYY-MM-DD",
- min: "2000-01-01",
- event: "focus"
- });
- })
- function openwin(url) {
- var a = document.createElement("a");
- a.setAttribute("href", url);
- a.setAttribute("target", "_blank");
- a.setAttribute("id", "openwin");
- document.body.appendChild(a);
- a.click();
- }
- //弹出窗体居中
- function f_Center(ll_Width, ll_Height) {
- var ll_Left;
- var ll_Top;
- var ls_Str;
- ll_Left = (screen.width - ll_Width) / 2
- ll_Top = (screen.height - ll_Height) / 2
- if (ll_Left < 0) {
- ll_Left = 0;
- }
- if (ll_Top < 0) {
- ll_Top = 0;
- }
- ls_Str = "left = " + ll_Left + ",top = " + ll_Top + ",width = " + ll_Width + ",height = " + ll_Height;
- return ls_Str;
- }
- function convert(rows) {
- function exists(rows, parentId) {
- for (var i = 0; i < rows.length; i++) {
- if (rows[i].id == parentId) return true;
- }
- return false;
- }
- var nodes = [];
- // get the top level nodes
- for (var i = 0; i < rows.length; i++) {
- var row = rows[i];
- if (!exists(rows, row.parentId)) {
- nodes.push({
- id: row.id,
- text: row.name
- });
- }
- }
- var toDo = [];
- for (var i = 0; i < nodes.length; i++) {
- toDo.push(nodes[i]);
- }
- while (toDo.length) {
- var node = toDo.shift(); // the parent node
- // get the children nodes
- for (var i = 0; i < rows.length; i++) {
- var row = rows[i];
- if (row.parentId == node.id) {
- var child = { id: row.id, text: row.name };
- if (node.children) {
- node.children.push(child);
- } else {
- node.children = [child];
- }
- toDo.push(child);
- }
- }
- }
- return nodes;
- }
- </script>
- </body>
- </html>
|