123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
-
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>MarketInspectFacilityList</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"/>
- <input id="hidSetSearch_Type" name="hidSetSearch_Type" type="hidden" value="0"/>
- </section>
- <section style="height: 95vh; padding: 10px 20px;">
- <div class="row tbToolBar" id="tbToolBar">
- <div class="toolbar" id="CurdTool">
- @*<a href="#" class="easyui-linkbutton" iconCls="icon-application_view_detail" plain="true" onclick="btn_Detail();">查看详情</a>
- <span class="shuxian"></span>*@
- <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="btn_Add()">添加</a>
- <span class="shuxian"></span>
- <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="btn_Edit()">修改</a>
- <span class="shuxian"></span>
- <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="btn_Del()">删除</a>
- </div>
- <div class="toolbar-search">
- <span>【请选择查询条件】</span>
- <input class="easyui-searchbox" data-options="prompt:'请输入查询条件...',menu:'#search',searcher:LoadTable" style="width: 300px; height: 25px;"/>
- <div id="search">
- @*<div data-options="name:'RoomSize'">检测场所面积</div>
- <div data-options="name:'InspectorCount'">检测人员数</div>*@
- <div data-options="name:'InspectorFacility'">检测设备名称</div>
- </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_Edit();
- },
- pagination: true,
- pageSize: 50,
- pageList: [20, 50, 100]
- ">
- <thead>
- <tr>
- <th data-options="field:'RoomSize',width:60">检测场所面积</th>
- <th data-options="field:'InspectorCount',width:80">检测人员数</th>
- <th data-options="field:'InspectorFacility',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">
- <span class="text-info" style="margin-top: 10px;letter-spacing:3px; display: inline-block;font-size:15px;">检测设施明细</span>
- <hr class="text-info" style="margin:5px 0 -2px;" />
- <div class="input-group">
- <label class="input-group-addon control-label" for="RoomSize">检测场所面积</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="RoomSize" id="RoomSize" type="text" value="" placeholder=""/>
- <span class="input-group-addon control-label">平方米</span>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="InspectorCount">检测人员数</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="InspectorCount" id="InspectorCount" type="text" value="" placeholder=""/>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="InspectorFacility">检测设备名称</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="InspectorFacility" id="InspectorFacility" type="text" value="" placeholder=""/>
- </div>
- <span class="text-info" style="margin-top: 10px;letter-spacing:3px; display: inline-block;font-size:15px;">检测人员明细</span>
- <hr class="text-info" style="margin:5px 0 -2px;" />
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector1Name">姓名</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector1Name" id="Inspector1Name" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector1Gender">性别</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Inspector1Gender" id="Inspector1Gender" type="text" value="" placeholder="">
- <option value="">请选择...</option>
- <option value="1">男</option>
- <option value="0">女</option>
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector1Age">年龄</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector1Age" id="Inspector1Age" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector1DegreeTypeID">学历</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Inspector1DegreeTypeID" id="Inspector1DegreeTypeID" type="text" value="" placeholder="">
- <option value="">请选择...</option>
- @Html.Raw(ViewBag.SelDegreeTypeInfo)
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector1Tel">电话</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector1Tel" id="Inspector1Tel" type="text" value="" placeholder="" />
- </div>
-
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector2Name">姓名</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector2Name" id="Inspector2Name" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector2Gender">性别</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Inspector2Gender" id="Inspector2Gender" type="text" value="" placeholder="">
- <option value="">请选择...</option>
- <option value="1">男</option>
- <option value="0">女</option>
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector2Age">年龄</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector2Age" id="Inspector2Age" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector2DegreeTypeID">学历</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Inspector2DegreeTypeID" id="Inspector2DegreeTypeID" type="text" value="" placeholder="">
- <option value="">请选择...</option>
- @Html.Raw(ViewBag.SelDegreeTypeInfo)
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector2Tel">电话</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector2Tel" id="Inspector2Tel" type="text" value="" placeholder="" />
- </div>
-
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector3Name">姓名</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector3Name" id="Inspector3Name" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector3Gender">性别</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Inspector3Gender" id="Inspector3Gender" type="text" value="" placeholder="">
- <option value="">请选择...</option>
- <option value="1">男</option>
- <option value="0">女</option>
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector3Age">年龄</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector3Age" id="Inspector3Age" type="text" value="" placeholder="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector3DegreeTypeID">学历</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Inspector3DegreeTypeID" id="Inspector3DegreeTypeID" type="text" value="" placeholder="">
- <option value="">请选择...</option>
- @Html.Raw(ViewBag.SelDegreeTypeInfo)
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Inspector3Tel">电话</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Inspector3Tel" id="Inspector3Tel" type="text" value="" placeholder="" />
- </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 Save(type) {
- type = type || $("#hid_Type").val();
- //var violationsNo = (type === "Add" || type === "Edit") ? $("#ID").val() : $('#dgTable').datagrid('getSelections')[0].ID;
- $.ajax({
- url: "@Url.Action("MarketInspectFacilityOper", "MarketSystemMg")",
- type: "post",
- dataType: "json",
- data: {
- Type: type,
- ID: $("#ID").val(),
- RoomSize: $("#RoomSize").val(),
- InspectorCount: $("#InspectorCount").val(),
- InspectorFacility: $("#InspectorFacility").val(),
- Inspector1Name: $("#Inspector1Name").val(),
- Inspector1Gender: $("#Inspector1Gender").val(),
- Inspector1Age: $("#Inspector1Age").val(),
- Inspector1DegreeTypeID: $("#Inspector1DegreeTypeID").val(),
- Inspector1Tel: $("#Inspector1Tel").val(),
- Inspector2Name: $("#Inspector2Name").val(),
- Inspector2Gender: $("#Inspector2Gender").val(),
- Inspector2Age: $("#Inspector2Age").val(),
- Inspector2DegreeTypeID: $("#Inspector2DegreeTypeID").val(),
- Inspector2Tel: $("#Inspector2Tel").val(),
- Inspector3Name: $("#Inspector3Name").val(),
- Inspector3Gender: $("#Inspector3Gender").val(),
- Inspector3Age: $("#Inspector3Age").val(),
- Inspector3DegreeTypeID: $("#Inspector3DegreeTypeID").val(),
- Inspector3Tel: $("#Inspector3Tel").val()
- },
- success: function(data) {
- if (CheckAajxData(data) === false) return;
- var msg = data.ErrorInfo;
- if (data.Success === true) {
- LoadTable();
- $("#winModal").window("close");
- layer.alert(msg, { icon: 1, title: '提示信息' });
- } else {
- layer.alert(msg, { icon: 7, title: '提示信息' });
- }
- }
- });
- }
- //添加
- function btn_Add() {
- $("#hid_Type").val("Add");
- $("#winModal input").val("");
- $("#winModal select").val("");
- $("#winModal textarea").val("");
- $("#Save span.l-btn-text").html("添加");
- $("#winModal").window("open");
- }
- //修改
- function btn_Edit() {
- $("#hid_Type").val("Edit");
- $("#Save span.l-btn-text").html("修改");
- SetModalVal();
- }
- //modal赋值
- function SetModalVal() {
- var rows = $('#dgTable').datagrid('getSelections');
- if (rows.length === 1) {
- var row = rows[0];
- //console.log(row);
-
- $("#ID").val(row.ID);
- $("#RoomSize").val(row.RoomSize);
- $("#InspectorCount").val(row.InspectorCount);
- $("#InspectorFacility").val(row.InspectorFacility);
- $("#Inspector1Name").val(row.Inspector1Name);
- $("#Inspector1Gender").val(row.Inspector1Gender);
- $("#Inspector1Age").val(row.Inspector1Age);
- $("#Inspector1DegreeTypeID").val(row.Inspector1DegreeTypeID);
- $("#Inspector1Tel").val(row.Inspector1Tel);
- $("#Inspector2Name").val(row.Inspector2Name);
- $("#Inspector2Gender").val(row.Inspector2Gender);
- $("#Inspector2Age").val(row.Inspector2Age);
- $("#Inspector2DegreeTypeID").val(row.Inspector2DegreeTypeID);
- $("#Inspector2Tel").val(row.Inspector2Tel);
- $("#Inspector3Name").val(row.Inspector3Name);
- $("#Inspector3Gender").val(row.Inspector3Gender);
- $("#Inspector3Age").val(row.Inspector3Age);
- $("#Inspector3DegreeTypeID").val(row.Inspector3DegreeTypeID);
- $("#Inspector3Tel").val(row.Inspector3Tel);
- if ($("#hid_Type").val() === "Edit") {
- $("#winModal").window("open");
- }
- } else {
- layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
- }
- }
- //加载表格数据
- function LoadTable(value, item) {
- $('#dgTable').datagrid({
- url: '@Url.Action("MarketInspectFacilityResult", "GetResult")' + '?PcVal=' + escape(value) + '&PcItem=' + item
- });
- }
- $(function() {
- //加载表格数据
- var value = $(".textbox.searchbox .textbox-value").val(), item = $(".textbox.searchbox .textbox-value").attr("name");
- LoadTable(value, item);
- //加载日历控件
- //laydate({
- // elem: '#InspectorCount',
- // format: "YYYY-MM-DD",
- // min: "1980-01-01",
- // event: "focus"
- //});
-
-
- });
- </script>
- </body>
- </html>
|