123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287 |
-
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>StandardList</title>
- <link href="~/easyui/themes/bootstrap/easyui.css" rel="stylesheet" />
- <link href="~/easyui/themes/icon.css" rel="stylesheet" />
- <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" />
- <style>
- .td_1 {
- padding-bottom: 5px;
- padding-left: 5px;
- }
- </style>
- </head>
- <body>
- <section class="hidden">
- <input id="hid_Type" name="hid_Type" type="hidden" value="0" />
- <input id="hid_IsLock" name="IsLock" type="hidden" value="N" />
- <input id="hid_MarketType" name="hid_MarketType" type="hidden" value="0" />
- </section>
- @*<section class="text-center title">
- <h2>市场信息</h2>
- </section>*@
- <section class="container-fluid" style="height: 100vh; padding-top: 20px;">
- <div class="row tbToolBar" id="tbToolBar">
- <div class="toolbar">
- <label>
- <input type="checkbox" id="DataToggle"> 显示已删除记录
- </label>
- </div>
- <div class="toolbar" id="CurdTool" style="float:left">
-
- <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-no" plain="true" onclick="DelOrRetore('Del')">删除</a>
- @*<input class="btn btn-primary" id="btn_back" type="button" value="返回" onclick="btn_Back()"/>*@
- </div>
- <div class="col-sm-3" id="ResetTool">
- <a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="DelOrRetore('ReDel')">恢复删除</a>
- </div>
- @*<div class="col-sm-2 pull-right">
- <input class="btn btn-primary" id="btn_search" type="button" value="通用搜索" data-toggle="modal" data-target="#search_modal" />
- </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,
-
- pagination: true,
- pageSize: 15,
- pageList: [15, 25, 50, 100]
- ">
- <thead>
- <tr>
- @*hid_IsLock<th data-options="field:'TradeTypeID'" class="hidden">行业类型</th>*@
- <th data-options="field:'SystemID',width:50">系统编号</th>
- <th data-options="field:'SystemName',width:50">系统名称</th>
- <th data-options="field:'shortName',width:80,">短名</th>
- <th data-options="field:'SysLongName',width:50,">系统长名称</th>
- <th data-options="field:'Description',width:50,">系统描述</th>
- </tr>
- </thead>
- </table>
- </section>
- <section>
- <div id="winGSSystemInfo" class="easyui-window" title="系统类型信息维护" data-options="modal:true,closed:true,iconCls:'icon-save'" style="width:600px;height:350px;padding:10px 10px;">
- <div class="easyui-layout" data-options="fit:true">
- <div data-options="region:'center'" style="padding:5px;height:250px">
- <table cellpadding="10" cellspacing="0" style="margin-left:10px">
- <tr>
- <td class="td_1">系统编号:</td>
- <td class="td_1"><input class="easyui-textbox" type="text" id="SystemID" name="SystemID" data-options="required:true" style="width:400px" /></td>
- </tr>
- <tr>
- <td class="td_1">系统名称:</td>
- <td class="td_1"><input class="easyui-textbox" type="text" id="SystemName" name="SystemName" data-options="required:true" style="width:400px" /></td>
- </tr>
- <tr>
- <td class="td_1">短名:</td>
- <td class="td_1">
- <input class="easyui-textbox" type="text" id="shortName" name="shortName" data-options="required:true" style="width:400px" />
- </td>
- </tr>
- <tr>
- <td class="td_1">系统长名称:</td>
- <td class="td_1">
- <input class="easyui-textbox" type="text" id="SysLongName" name="SysLongName" data-options="required:true" style="width:400px" />
- </td>
- </tr>
- <tr>
- <td class="td_1">系统描述:</td>
- <td class="td_1">
- <textarea id="Description" rows="4" style="width:400px"></textarea>
- </td>
- </tr>
- </table>
- </div>
- <div data-options="region:'south',border:false" style="text-align:right;height:50px;padding-top:5px">
- <a class="easyui-linkbutton" 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="$('#winGSSystemInfo').window('close');" style="width:80px">取消</a>
- </div>
- </div>
- </div>
-
-
- </section>
- <script>
- //切换显示不同状态数据
- $("#DataToggle").on("click",
- function () {
- if ($('#hid_IsLock').val() === "N") {
- $('#hid_IsLock').val("Y");
- $("#CurdTool").hide();
- $("#ResetTool").show();
- } else {
- $('#hid_IsLock').val("N");
- $("#ResetTool").hide();
- $("#CurdTool").show();
- }
- window.LoadTable();
- });
- //添加
- function btn_Add() {
- $("#hid_Type").val("Add");
- $('#SystemID').textbox('enable');
- $('#SystemID').textbox('setValue', '');
- $('#SystemName').textbox('setValue','');
- $('#shortName').textbox('setValue', '');
- $('#SysLongName').textbox('setValue', '');
- $('#Description').val('');
- $("#winGSSystemInfo").window("open");
- }
- //修改
- function btn_Edit() {
- $("#hid_Type").val("Edit");
- var row = $('#dgTable').datagrid('getSelected');
- if (row) {
- $("#SystemID").textbox('disable');
- $("#SystemID").textbox('setValue', row.SystemID);
- $("#SystemName").textbox('setValue', row.SystemName);
- $("#shortName").textbox('setValue', row.shortName);
- $("#SysLongName").textbox('setValue', row.SysLongName);
- $("#Description").val(row.Description);
- $("#winGSSystemInfo").window("open");
- } else {
- layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
- }
- }
- function DelOrRetore(type) {
- var SystemID = $('#dgTable').datagrid('getSelections')[0].SystemID;
- if (!SystemID) {
- layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
- return;
- }
- if (type == 'Del' || type === "ReDel" ) {
- $.messager.confirm('删除或恢复', '确定删除或恢复这条记录?', function (r) {
- if (r) {
- $.ajax({
- url: "@Url.Action("GSSystemListOper", "BaseInfo")",
- type: "post",
- data: {
- Type: type,
- SystemID: SystemID
- },
- success: function (data) {
- if (CheckAajxData(data) == false) {
- return;
- }
- var msg = JSON.parse(data);
- if (msg != null && msg.Success == true) {
- LoadTable();
- layer.alert("操作成功!", { title: '提示信息' });
- } else {
- layer.alert(msg.ErrorInfo, { title: '提示信息' });
- }
-
- }
- });
- }
- })
- }
- }
- //提交
- function Save(type) {
- type = type || $("#hid_Type").val();
- var SystemID = (type === "Edit" || type === "Del" || type === "ReDel") ? $('#dgTable').datagrid('getSelections')[0].SystemID : $("#SystemID").textbox('getValue');
- $.ajax({
- url: "@Url.Action("GSSystemListOper", "BaseInfo")",
- type: "post",
- data: {
- Type: type,
- SystemID: SystemID,
- SystemName: $("#SystemName").textbox('getValue'),
- shortName: $("#shortName").textbox('getValue'),
- SysLongName: $("#SysLongName").textbox('getValue'),
- Description: $("#Description").val()
- },
- success: function (data) {
- if (CheckAajxData(data) == false) {
- return;
- }
- var msg = JSON.parse(data);
- if (msg != null && msg.Success == true) {
- LoadTable();
- $('#winGSSystemInfo').window('close');
- layer.alert("操作成功!", { title: '提示信息' });
- } else {
- layer.alert(data.ErrorInfo, { title: '提示信息' });
- }
- }
- });
- }
- //modal赋值
- function SetModalVal() {
- var rows = $('#dgTable').datagrid('getSelections');
- if (rows.length === 1) {
- var row = rows[0];
- //console.log(row);
- $("#SystemID").val(row.SystemID),
- $("#SystemName").val(row.SystemName),
- $("#shortName").val(row.shortName),
- $("#SysLongName").val(row.SysLongName),
- $("#Description").val(row.Description),
- $("#SystemType").val(row.SystemType),
- $("#modal").modal("show");
- } else {
- layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
- }
- }
- //加载表格数据
- function LoadTable() {
- $('#dgTable').datagrid({
- url: '@Url.Action("GetGSSystemList", "BaseInfo")' + '?IsLock=' + $('#hid_IsLock').val(),
- onDblClickRow: function () {
- if ($('#hid_IsLock').val() === "N") {
- btn_Edit();
- }
- },
- });
- }
- $(function () {
- //加载表格数据
- window.LoadTable();
- //加载日历控件
- //laydate({
- // elem: '#PractiseTime',
- // format: "YYYY-MM-DD",
- // min: "1980-01-01",
- // event: "focus"
- //});
- });
- </script>
- </body>
- </html>
|