123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="keywords" content="">
- <meta name="description" content="">
- <title text="数据集合"></title>
- <link rel="stylesheet" href="../../../component/pear/css/pear.css" />
- <link rel="stylesheet" href="../../../admin/css/other/user.css" />
- </head>
- <body class="pear-container">
- <div class="layui-card">
- <div class="layui-card-body">
- <form class="layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">区县名称</label>
- <div class="layui-input-inline">
- <select name="district" id="district">
- </select>
- </div>
- <button class="pear-btn pear-btn-md-0 pear-btn-primary" lay-submit lay-filter="query">
- <i class="layui-icon layui-icon-search"></i> 查询
- </button>
- <button type="reset" class="pear-btn pear-btn-md-0">
- <i class="layui-icon layui-icon-refresh"></i> 重置
- </button>
- </div>
- </form>
- </div>
- </div>
- <div class="layui-card">
- <div class="layui-card-body">
- <table id="table" lay-filter="table"></table>
- </div>
- </div>
- </body>
- <script type="text/html" id="toolbar">
- </script>
- <script type="text/html" id="bar">
- <a class="cool-line-btn cool-bg-blue" lay-event="edit">办结</a>
- <div class="cool-line-divider"></div>
- <a class="cool-line-btn cool-bg-blue" lay-event="detail">详情</a>
- </script>
- <script type="text/html" id="createTimeTpl">
- {{layui.util.toDateString(d.createTime, 'yyyy-MM-dd HH:mm:ss')}}
- </script>
- <script src="../../../component/layui/layui.js"></script>
- <script src="../../../component/pear/pear.js"></script>
- <script>
- layui.use(['request', 'table', 'form', 'popup', 'common'], function () {
- var request = layui.request,
- table = layui.table,
- form = layui.form,
- popup = layui.popup,
- common = layui.common;
- var MODULE_PATH = "/business/data/v1/";
- layer.ready(function() {
- request.dictSelect('district', 'sys_district');
- });
- request.tableRender({
- url: MODULE_PATH,
- cols: [
- [
- {type: 'checkbox'},
- {title: '区县名称', field: 'districtName', align: 'center'},
- {title: '年月', field: 'yearMonth', align: 'center'},
- {title: '住宅销售套数(套)', field: 'saleNumber', align: 'center'},
- {title: '住宅销售面积(m²)', field: 'saleArea', align: 'center'},
- {title: '住宅销售总价(元)', field: 'saleTotalPrice', align: 'center'},
- {title: '非住宅销售套数(套)', field: 'otherSaleNumber', align: 'center'},
- {title: '非住宅销售面积(m²)', field: 'otherSaleArea', align: 'center'},
- {title: '非住宅销售总价(元)', field: 'otherSaleTotalPrice', align: 'center'},
- {title: '办结状态', field: 'isEnd', align: 'center', templet: function (d) {
- return d.isEnd == 1 ? '<span class="layui-badge-dot success"></span>已办结' : '<span class="layui-badge-dot warning"></span>未办结';
- }
- },
- {title: '操作', toolbar: '#bar', align: 'center', width: 130}
- ]
- ]
- });
- table.on('tool(table)', function (obj) {
- if (obj.event === 'edit') {
- isend(obj);
- }
- else if (obj.event === 'detail') {
- window.location.href = 'view.html?district=' + obj.data.district+'&yearMonth=' + obj.data.yearMonth;
- }
- });
- form.on('submit(query)', function (data) {
- refresh(data.field);
- return false;
- });
- window.isend= function(obj) {
- layer.confirm("是否确认办结?", function () {
- request.http({
- type: "get",
- url: MODULE_PATH+"end?district=" + obj.data.district+"&yearMonth="+obj.data.yearMonth,
- loading: true,
- success: function (result) {
- refresh();
- if (result.success) {
- popup.success(result.msg);
- } else {
- popup.failure(result.msg);
- }
- }
- })
- });
- };
- window.refresh = function (param) {
- table.reload('table', {where: param});
- };
- })
- </script>
- </html>
|