123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427 |
-
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>MarketsListCs</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="~/Content/js/plugins/validate/jquery.validate.min.js"></script>
- <script src="~/Content/js/plugins/validate/messages_zh.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="hid_IsLock" name="IsLock" type="hidden" value="0" />
- <input id="hid_MarketType" name="hid_MarketType" type="hidden" value="6" />
- </section>
- <section style="height:95vh; padding: 10px 20px;">
- <div class="row tbToolBar" id="tbToolBar">
- <div class="toolbar">
- <label>
- <input type="checkbox" id="DataToggle"> 显示已删除记录
- </label>
- </div>
- <div class="toolbar" id="CurdTool">
- <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" id="ResetTool">
- <a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="Save('ReDel')">恢复删除</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:'Names'">超市名称</div>
- <div data-options="name:'MarketID'">注册号码</div>
- <div data-options="name:'LicenseNo'">执照编码</div>
- <div data-options="name:'LicenseName'">执照名称</div>
- <div data-options="name:'MarketTypeName'">市场类型</div>
- <div data-options="name:'RegionNames'">所属辖区</div>
- </div>
- </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="SearchNames">市场名称</label></td>
- <td><input class="easyui-textbox" type="text" id="SearchNames" name="SearchNames" style="height: 25px; width: 150px" data-options="" /></td>
- </tr>
- <tr>
- <td><label for="SearchMarketID">注册号码</label></td>
- <td><input class="easyui-textbox" type="text" id="SearchMarketID" name="SearchMarketID" style="height: 25px; width: 150px" data-options="" /></td>
- </tr>
- <tr>
- <td><label for="SearchRegionID">所属辖区</label></td>
- <td>
- <select class="easyui-combobox" type="text" id="SearchRegionID" name="SearchRegionID" style="height: 25px; width: 150px">
- <option value="">全部</option>
- @Html.Raw(ViewBag.SelRegionInfo)
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="SearchLicenseNo">执照编码</label></td>
- <td><input class="easyui-textbox" type="text" id="SearchLicenseNo" name="SearchLicenseNo" style="height: 25px; width: 150px" data-options="" /></td>
- </tr>
- <tr>
- <td><label for="SearchLicenseName">执照名称</label></td>
- <td><input class="easyui-textbox" type="text" id="SearchLicenseName" name="SearchLicenseName" style="height: 25px; width: 150px" data-options="" /></td>
- </tr>
- <tr>
- <td><label for="SearchMarketTypeName">市场类型</label></td>
- <td>
- <select class="easyui-combobox" type="text" id="SearchMarketTypeName" name="SearchMarketTypeName" style="height: 25px; width: 150px" data-options="">
- @Html.Raw(ViewBag.SelMarketTypeInfo)
- </select>
- </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_Edit();
- },*@
- pagination: true,
- pageSize: 50,
- pageList: [20, 50, 100]
- ">
- <thead>
- <tr>
- <th data-options="field:'MarketID',width:80">注册号</th>
- <th data-options="field:'Names',width:150">超市名称</th>
- <th data-options="field:'LicenseNo',width:100">执照编码</th>
- <th data-options="field:'LicenseName',width:150">执照名称</th>
- <th data-options="field:'CardIndex',width:80">食品信用安全码</th>
- <th data-options="field:'RegionNames',width:80,">所属辖区</th>
- <th data-options="field:'LockState',width:50,">状态</th>
- </tr>
- </thead>
- </table>
- </section>
- <section>
- <div id="winModal" class="easyui-window winModal" title="超市信息详情" style="width: 800px;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" class="row">
- <div class="panle-half">
- <div class="input-group">
- <label class="input-group-addon control-label" for="MarketID">注册号码</label>
- <input class="form-control input-group-addon required" aria-disabled="true" name="MarketID" id="MarketID" type="text" value="" placeholder="填写注册号码" />
- <strong class="text-requird input-group-addon control-label">*</strong>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="RegionId">所属辖区</label>
- <select class="form-control input-group-addon required" aria-disabled="true" name="RegionId" id="RegionId" type="text" value="" placeholder="选择所属辖区">
- @Html.Raw(ViewBag.SelRegionInfo)
- </select>
- <strong class="text-requird input-group-addon control-label">*</strong>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="LicenseNo">执照编码</label>
- <input class="form-control input-group-addon" aria-disabled="true" required name="LicenseNo" id="LicenseNo" type="text" value="" placeholder="填写营业执照编码" />
- <strong class="text-requird input-group-addon control-label">*</strong>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="CardIndex">食品安全码</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="CardIndex" id="CardIndex" type="text" value="" placeholder="填写食品信用安全码" />
- </div>
-
- <div class="input-group">
- <label class="input-group-addon control-label" for="Area">
- 面积
- </label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Area" id="Area" type="text" value="" />
- <span class="input-group-addon control-label">平方米</span>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="MarketSellerNum">经营户总数</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="MarketSellerNum" id="MarketSellerNum" type="text" value="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Principal">负责人</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Principal" id="Principal" type="text" value="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="LinkMan">联系人</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="LinkMan" id="LinkMan" type="text" value="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="FrontForUnit">主办单位</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="FrontForUnit" id="FrontForUnit" type="text" value="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Address">位置</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Address" id="Address" type="text" value="" />
- </div>
- </div>
- <div class="panle-half">
- <div class="input-group">
- <label class="input-group-addon control-label" for="Name">超市名称</label>
- <input class="form-control input-group-addon required" aria-disabled="true" name="Name" id="Name" type="text" value="" />
- <strong class="text-requird input-group-addon control-label">*</strong>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="MarketTypeID">市场类型</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="MarketTypeID" id="MarketTypeID" type="text" value="">
- @Html.Raw(ViewBag.SelMarketTypeInfo)
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="LicenseName">执照名称</label>
- <input class="form-control input-group-addon" aria-disabled="true" required name="LicenseName" id="LicenseName" type="text" value="" placeholder="填写营业执照名称" />
- <strong class="text-requird input-group-addon control-label">*</strong>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="PractiseTime">开业时间</label>
- <input class="form-control input-group-addon laydate-icon" readonly="readonly" aria-disabled="true" name="PractiseTime" id="PractiseTime" type="text" value="" placeholder="填写开业时间" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Upgrade">提升方案</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="Upgrade" id="Upgrade" type="text" value="">
- @Html.Raw(ViewBag.SelUpgradeInfo)
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Turnover">营业额</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Turnover" id="Turnover" type="text" value="" />
- <span class="input-group-addon control-label">万元</span>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="AuditFlag">规划审批</label>
- <select class="form-control input-group-addon" aria-disabled="true" name="AuditFlag" id="AuditFlag" type="text" value="">
- <option value="0">是</option>
- <option value="1">否</option>
- </select>
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="Telephone">联系电话</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="Telephone" id="Telephone" type="text" value="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="LinkTel">联系人电话</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="LinkTel" id="LinkTel" type="text" value="" />
- </div>
- <div class="input-group">
- <label class="input-group-addon control-label" for="ManageUnit">管理单位</label>
- <input class="form-control input-group-addon" aria-disabled="true" name="ManageUnit" id="ManageUnit" type="text" value="" />
- </div>
-
- </div>
- <div class="panle-fluid">
- <div class="input-group">
- <label class="input-group-addon control-label" for="Remark">备注</label>
- <textarea class="form-control input-group-addon" rows="3" aria-disabled="true" name="Remark" id="Remark" type="text" value=""></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 Save(type) {
- type = type || $("#hid_Type").val();
- var marketId = (type === "Add" || type === "Edit") ? $("#MarketID").val() : $('#dgTable').datagrid('getSelections')[0].MarketID;
- $.ajax({
- url: "@Url.Action("MarketsListOper","MarketSystem",new {id="Cs"})",
- type: "post",
- dataType: "json",
- beforeSend: function () {
- return BeforeSend();
- },
- data: {
- Type: type,
- MarketID: marketId,
- RegionId: $("#RegionId").val(),
- LicenseNo: $("#LicenseNo").val(),
- LicenseName: $("#LicenseName").val(),
- CardIndex: $("#CardIndex").val(),
- PractiseTime: $("#PractiseTime").val(),
- Area: $("#Area").val(),
- MarketSellerNum: $("#MarketSellerNum").val(),
- Principal: $("#Principal").val(),
- LinkMan: $("#LinkMan").val(),
- FrontForUnit: $("#FrontForUnit").val(),
- Address: $("#Address").val(),
- Name: $("#Name").val(),
- MarketTypeID: $("#MarketTypeID").val(),
- Upgrade: $("#Upgrade").val(),
- Turnover: $("#Turnover").val(),
- AuditFlag: $("#AuditFlag").val(),
- Telephone: $("#Telephone").val(),
- LinkTel: $("#LinkTel").val(),
- ManageUnit: $("#ManageUnit").val(),
- Remark: $("#Remark").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: '提示信息' });
- }
- }
- });
- }
- //modal赋值
- function SetModalVal() {
- var rows = $('#dgTable').datagrid('getSelections');
- if (rows.length === 1) {
- var row = rows[0];
- //console.log(row);
- $("#MarketID").val(row.MarketID).attr("readonly", "readonly");
- $("#RegionId").val(row.RegionID);
- $("#LicenseNo").val(row.LicenseNo);
- $("#LicenseName").val(row.LicenseName);
- $("#CardIndex").val(row.CardIndex);
- $("#PractiseTime").val(row.PractiseTime);
- $("#Area").val(row.Area);
- $("#MarketSellerNum").val(row.MarketSellerNum);
- $("#Principal").val(row.Principal);
- $("#LinkMan").val(row.LinkMan);
- $("#FrontForUnit").val(row.FrontForUnit);
- $("#Address").val(row.Address);
- $("#Name").val(row.Names);
- $("#MarketTypeID").val(row.MarketTypeID);
- $("#Upgrade").val(row.Upgrade);
- $("#Turnover").val(row.Turnover);
- $("#AuditFlag").val(row.AuditFlag);
- $("#Telephone").val(row.Telephone);
- $("#LinkTel").val(row.LinkTel);
- $("#ManageUnit").val(row.ManageUnit);
- $("#Remark").val(row.Remark);
- if ($("#hid_Type").val() === "Edit") {
- $("#winModal").window("open");
- }
- } else {
- layer.alert('请选择一条记录进行设置', {title:'提示信息'});
- }
- }
- //加载表格数据
-
- function LoadTable_Lock() {
- $('#dgTable').datagrid({
- url: '@Url.Action("MarketsListResult", "GetResult")',
- onDblClickRow: function () {
-
- },
- queryParams: {
- IsLock: $("#hid_IsLock").val(),
- MarketType: $("#hid_MarketType").val(),
- Names: $("#SearchNames").textbox("getValue"),
- MarketID: $("#SearchMarketID").textbox("getValue"),
- RegionID: $("#SearchRegionID").combobox("getValue"),
- LicenseNo: $("#SearchLicenseNo").textbox("getValue"),
- LicenseName: $("#SearchLicenseName").textbox("getValue"),
- MarketTypeName: $("#SearchMarketTypeName").combobox("getValue")
- }
- });
- }
- function LoadTable(collapsed) {
- collapsed = collapsed || false;
- if (collapsed===true) {
- $("#Search").panel("collapse", true);
- }
- if ($("#hid_IsLock").val() === "1") {
- LoadTable_Lock();
- } else {
- $('#dgTable').datagrid({
- url: '@Url.Action("MarketsListResult", "GetResult")',
- onDblClickRow: function () {
- btn_Edit();
- },
- queryParams: {
- IsLock: $("#hid_IsLock").val(),
- MarketType: $("#hid_MarketType").val(),
- Names: $("#SearchNames").textbox("getValue"),
- MarketID: $("#SearchMarketID").textbox("getValue"),
- RegionID: $("#SearchRegionID").combobox("getValue"),
- LicenseNo: $("#SearchLicenseNo").textbox("getValue"),
- LicenseName: $("#SearchLicenseName").textbox("getValue"),
- MarketTypeName: $("#SearchMarketTypeName").combobox("getValue")
- }
- });
- }
- }
- $(function () {
- //加载表格数据
- setTimeout(LoadTable(false), 500);
- //加载日历控件
- laydate({
- elem: '#PractiseTime',
- format: "YYYY-MM-DD",
- min: "1980-01-01",
- event: "focus"
- });
- });
- </script>
- </body>
- </html>
|