123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355 |
-
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>CleansingCheckLogQry</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>
- <link href="~/Content/css/Style/Markets.css" rel="stylesheet" />
- <script src="~/Content/js/js/MarketJs.js"></script>
- </head>
- <body>
- <section class="hidden">
- <input id="hid_Type" name="hid_Type" type="hidden" value="0" />
- </section>
- <section style="height:95vh; padding: 10px 20px;">
- <div class="row tbToolBar" id="tbToolBar">
- <div class="toolbar">
- <a href="#" class="easyui-linkbutton" iconCls="icon-application_view_detail" plain="true" onclick="btn_Detail();">查看详情</a>
- </div>
- <div class="toolbar-search">
- <div id="Search" class="easyui-panel" title="请展开面板输入查询条件" style="width: 300px; height: 330px; padding: 10px;"
- data-options="iconCls:'icon-heart',collapsible:true,minimizable:false,maximizable:false,closable:false,collapsed:true,tools:[
- {
- iconCls:'icon-search',
- handler:function(){LoadTable(true)}
- }]">
- <table>
- <tr>
- <td><label for="SearchRegionID">辖区工商</label></td>
- <td>
- <select class="easyui-combobox" type="text" id="SearchRegionID" name="SearchRegionID" style="height: 25px; width: 150px" data-options="onSelect:function(){GetMarketSelStr()}">
- <option value="">全部</option>
- @Html.Raw(ViewBag.SelRegionInfo)
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="SearchMarketID">隶属市场</label></td>
- <td>
- <select class="easyui-combobox" type="text" id="SearchMarketID" name="SearchMarketID" style="height: 25px; width: 150px" data-options="">
- @*@Html.Raw(ViewBag.SelMarketInfo)*@
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="SearchExecutor">检查员</label></td>
- <td>
- <input class="easyui-textbox" type="text" id="SearchExecutor" name="SearchExecutor" style="height: 25px; width: 150px" data-options="" />
- </td>
- </tr>
- <tr>
- <td><label for="SearchAssessLevelID">检查结果</label></td>
- <td>
- <select class="easyui-combobox" type="text" id="SearchAssessLevelID" name="SearchAssessLevelID" style="height: 25px; width: 150px" data-options="">
- <option value="">全部结果</option>
- @Html.Raw(ViewBag.SelAssessLevelInfo)
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="SearchSelfCheckFlag">是否自检</label></td>
- <td>
- <select class="easyui-combobox" type="text" id="SearchSelfCheckFlag" name="SearchSelfCheckFlag" style="height: 25px; width: 150px" data-options="">
- <option value="">全部</option>
- <option value="1">是</option>
- <option value="0">否</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="SearchStartTime">开始时间</label></td>
- <td><input class="easyui-textbox" type="text" id="SearchStartTime" name="SearchStartTime" style="height: 25px; width: 150px" data-options="" /></td>
- </tr>
- <tr>
- <td><label for="SearchEndTime">结束时间</label></td>
- <td><input class="easyui-textbox" type="text" id="SearchEndTime" name="SearchEndTime" style="height: 25px; width: 150px" data-options="" /></td>
- </tr>
- <tr>
- <td colspan="2" style="text-align: center; width: 100%">
- <a href="#" class="easyui-linkbutton" iconCls="icon-search" style="width: 100%; height: 25px" onclick="LoadTable(true);">查询</a>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <table id="dgTable" class="easyui-datagrid" style="height: 100%;"
- data-options="singleSelect: true,
- method: 'post',
- multiSort: false,
- toolbar: '#tbToolBar',
- fitColumns: true,
- @*rownumbers: true,*@
- remoteSort: false,
- @*loadFilter: pagerFilter,*@
- onDblClickRow: function () {
- btn_Detail();
- },
- pagination: true,
- pageSize: 50,
- pageList: [20, 50, 100]
- ">
- <thead>
- <tr>
- <th data-options="field:'MarketName',width:100">市场名称</th>
- <th data-options="field:'AssessLevelName',width:150">检查结果</th>
- <th data-options="field:'LogDate',width:80">检查日期</th>
- <th data-options="field:'Executor',width:50">检查员</th>
- </tr>
- </thead>
- </table>
- </section>
- <section>
- <div id="winModal" class="easyui-window winModal" title="卫生检查详情" style="width: 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:15px 25px 0;">
- <form id="form">
- @Html.Hidden("ID")
- <div class="panle-fluid">
- <div class="input-group">
- <label class="input-group-addon control-label" for="RegionID">所属辖区</label>
- <select class="form-control input-group-addon" type="text" id="RegionID" name="RegionID" onchange="GetMarketSelStr();">
- <option value="">全部</option>
- @Html.Raw(ViewBag.SelRegionInfo)
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="MarketName">市场名称</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="MarketName" id="MarketName" type="text" value="" placeholder="" />
-
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Executor">检查员</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Executor" id="Executor" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="LogDate">检查日期</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="LogDate" id="LogDate" type="text" value="" placeholder=""/>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="AssessLevelID">检查结果</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="AssessLevelID" id="AssessLevelID" type="text" value="" placeholder="选择市场">
- @Html.Raw(ViewBag.SelAssessLevelInfo)
- </select>
- </div>
-
- <div class="input-group">
- <label class="input-group-addon control-label" for="SelfCheckFlag">是否自检</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="SelfCheckFlag" id="SelfCheckFlag" type="text" value="" placeholder="">
- <option value="1">是</option>
- <option value="0">否</option>
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="FileTitle">附件下载</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="FileTitle" id="FileTitle" type="text" value="" placeholder="" disabled="disabled" />
- <a id="FileDownload" class="input-group-addon control-label" href="#" data-src="" onclick="FileDownload('#FileDownload')" download="" style="cursor:pointer">点击下载</a>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Reason">备注</label>
- <textarea class="form-control input-group-addon" aria-disabled="true" rows="5" name="Reason" id="Reason" type="text" value="" placeholder=""></textarea>
- </div>
- </div>
- </form>
- </div>
- <div data-options="region:'south',border:false" style="text-align:right;height:45px; padding:13px 20px 0;">
- @*<a class="easyui-linkbutton" id="Save" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="Save()" 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 LoadTable(collapsed) {
- collapsed = collapsed || false;
- var marketId = $("input.textbox-value[name='SearchMarketID']").val(),
- startTime = $('#SearchStartTime').val(),
- endTime = $('#SearchEndTime').val(),
- executor = $("input.textbox-value[name='SearchExecutor']").val(),
- assessLevelId = $("input.textbox-value[name='SearchAssessLevelID']").val(),
- selfCheckFlag = $("input.textbox-value[name='SearchSelfCheckFlag']").val();
- if (collapsed === true) {
- $("#Search").panel("collapse", true);
- }
- $('#dgTable').datagrid({
- url: '@Url.Action("CleansingCheckLogQryResult", "GetResult")' + '?MarketID=' + escape(marketId) + '&StartTime=' + escape(startTime) + '&EndTime=' + escape(endTime) + '&Executor=' + escape(executor) + '&AssessLevelID=' + escape(assessLevelId) + '&SelfCheckFlag=' + escape(selfCheckFlag)
- });
- }
- function btn_Detail()
- {
- var rows = $('#dgTable').datagrid('getSelections');
- if (rows.length === 1) {
- var row = rows[0];
- //GetSearchMarketSelStr();
- //console.log(row);
- $("#ID").val(row.ID);
- $("#MarketName").val(row.MarketName);
- $("#AssessLevelID").val(row.AssessLevelID);
- $("#Executor").val(row.Executor);
- $("#SelfCheckFlag").val(row.SelfCheckFlag);
- $("#Reason").val(row.Reason);
- $("#LogDate").val(row.LogDate);
- $("#FileTitle").val(row.FileTitle);
- if (row.FilePath != null && row.FilePath !== "" && row.FileName != null && row.FileName !== "")
- $("#FileDownload").attr({
- "href": "../" + row.FilePath + "/" + row.FileName,
- "download": row.FileTitle,
- "onclick": "FileDownload('#FileDownload')"
- });
- else
- $("#FileDownload").removeAttr("href").removeAttr("onclick");
- $("#winModal input").attr("disabled", "disabled");
- $("#winModal textarea").attr("disabled", "disabled");
- $("#winModal").window("open");
- } else {
- layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
- }
- }
- //function FileDownload() {
- // var url = $("#FileDownload").attr("href");
- // if (url === "") {
- // layer.alert('当前没有附件可以下载查看!', { title: '提示信息' });
- // } else {
-
- // window.win = open(url);
- // setTimeout('win.document.execCommand("SaveAs")', 500);
- // }
-
- //}
- //function FileDownload() {
- // var url = $("#FileDownload").attr("href");
- // if (url === "") {
- // layer.alert('当前没有附件可以下载查看!', { title: '提示信息' });
- // } else {
-
- // window.win = open(url);
- // setTimeout('win.document.execCommand("SaveAs")', 500);
- // }
-
- //}
- //根据辖区获取市场下拉框的option
- function GetMarketSelStr() {
- $.ajax({
- url: "/GetResult/GetMarketSelStrResult",
- type: "post",
- dataType: "json",
- data: { RegionID: $("input.textbox-value[name='SearchRegionID']").val() },
- success: function (data) {
- //console.log(msg);
- if (CheckAajxData(data) === false) return;;
- var rows = data.rows;
- var first = "{\"MarketID\":\"";
- for (var i = 0; i < rows.length; i++) {
- first += (first === "{\"MarketID\":\"" ? "" : "@@|@@") + rows[i].MarketID;
- }
- first += "\",\"Names\":\"全部\"}";
- var firstJson = JSON.parse(first);
- rows.unshift(firstJson);
- console.log(rows);
- $('#SearchMarketID').combobox("clear").combobox({
- data: rows,
- valueField: 'MarketID',
- textField: 'Names',
- onLoadSuccess: function () {
- var val = $(this).combobox('getData');
- // ReSharper disable once MissingHasOwnPropertyInForeach
- for (var item in val[0]) {
- if (item === 'MarketID') {
- $(this).combobox('select', val[0][item]);
- }
- }
- }
- });
- }
- });
- }
- var start = {
- elem: "#StartTime",
- format: "YYYY-MM-DD",
- min: "2010-01-01",
- event: "focus",
- choose: function (datas) {
- end.min = datas; //开始日选好后,重置结束日的最小日期
- end.start = datas; //将结束日的初始值设定为开始日
- $('#SearchStartTime').val(datas);
- }
- },
- end = {
- elem: "#EndTime",
- format: "YYYY-MM-DD",
- min: "2010-01-01",
- event: "focus",
- choose: function (datas) {
- start.max = datas; //结束日选好后,重置开始日的最大日期
- $('#SearchEndTime').val(datas);
- }
- };
- $(function () {
- $("#SearchStartTime").next("span").find("input").attr("id", "StartTime");
- $("#SearchEndTime").next("span").find("input").attr("id", "EndTime");
- $("#SearchStartTime").textbox("setValue", laydate.now(-7, 'YYYY-MM-DD'));
- $("#SearchEndTime").textbox("setValue", laydate.now(0, 'YYYY-MM-DD'));
- GetMarketSelStr();
- //加载表格数据
- setTimeout(LoadTable,100);
- //加载日历控件
- laydate(start);
- laydate(end);
- });
- </script>
- </body>
- </html>
|