|
|
@@ -152,10 +152,10 @@
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>农场名称</th>
|
|
|
- <th>地址</th>
|
|
|
- <th>面积</th>
|
|
|
<th>负责人</th>
|
|
|
<th>联系电话</th>
|
|
|
+ <th>面积</th>
|
|
|
+ <th>地址</th>
|
|
|
<th>操作</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
@@ -191,7 +191,7 @@
|
|
|
});
|
|
|
|
|
|
//第一个实例
|
|
|
- getData('garden_check_list', 1, 0) //url,page,信息类型
|
|
|
+ getData('farm_check_list', 1, 0) //url,page,信息类型
|
|
|
|
|
|
//监听提交
|
|
|
form.on('submit(formDemo)', function (data) {
|
|
|
@@ -204,7 +204,7 @@
|
|
|
|
|
|
function getData(url, page, hidden) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'farm_check_list',
|
|
|
type: 'get',
|
|
|
data: {
|
|
|
page: page,
|
|
|
@@ -218,11 +218,12 @@
|
|
|
// , count: 30
|
|
|
, count: $('#totalPage').val()
|
|
|
, theme: '#2ca9f9'
|
|
|
+ , curr:page
|
|
|
, layout: ['prev', 'page', 'next', 'skip']
|
|
|
, jump: function (obj, first) {
|
|
|
if (!first) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'farm_check_list',
|
|
|
type: 'get',
|
|
|
data: { page: obj.curr,hidden: hidden },
|
|
|
dataType: 'html',
|
|
|
@@ -246,7 +247,7 @@
|
|
|
// 编辑
|
|
|
function editFun(id) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'farm_check_list',
|
|
|
type: 'post',
|
|
|
data: {
|
|
|
id: id,
|
|
|
@@ -276,14 +277,19 @@
|
|
|
}
|
|
|
|
|
|
// 通过
|
|
|
- function passFun(id) {
|
|
|
- layer.confirm('是否通过此信息',{title:'通过'}, function (index) {
|
|
|
+ function passFun(id,req) {
|
|
|
+ if(req == 'check1'){
|
|
|
+ var title = '是否通过此信息';
|
|
|
+ }else{
|
|
|
+ var title = '是否驳回此信息';
|
|
|
+ }
|
|
|
+ layer.confirm(title,{title:'提示'}, function (index) {
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'farm_check_list',
|
|
|
type: 'post',
|
|
|
data: {
|
|
|
id: id,
|
|
|
- req: 'check'
|
|
|
+ req: req
|
|
|
},
|
|
|
dataType: 'json',
|
|
|
success: function (data) {
|
|
|
@@ -292,7 +298,7 @@
|
|
|
// parent.layer.msg("操作成功!", {time: 1000}, function () {
|
|
|
//重新加载父页面
|
|
|
// location.reload();
|
|
|
- getData('garden_check_list', $('.layui-laypage-curr em').eq(1).html(), $('.permission .active').data('type'))
|
|
|
+ getData('farm_check_list', $('.layui-laypage-curr em').eq(1).html(), $('.permission .active').data('type'))
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -302,56 +308,9 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- // 删除
|
|
|
- function delFun(id) {
|
|
|
- layer.confirm('真的删除行么',{title:'删除'}, function (index) {
|
|
|
- $.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
- type: 'post',
|
|
|
- data: {
|
|
|
- req: 'del',
|
|
|
- id: id,
|
|
|
- },
|
|
|
- dataType: 'json',
|
|
|
- success: function (data) {
|
|
|
- if (data) {
|
|
|
- // location.reload();
|
|
|
- getData('garden_check_list', $('.layui-laypage-curr em').eq(1).html(), $('.permission .active').data('type'))
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- layer.close(index);
|
|
|
- });
|
|
|
- }
|
|
|
|
|
|
|
|
|
- //查看
|
|
|
- function lokFun(id) {
|
|
|
- layer.open({
|
|
|
- type: 0,
|
|
|
- id: 'Layer',
|
|
|
- title: '农场查看',
|
|
|
- area: ['740px', '500px'],
|
|
|
- shade: 0,
|
|
|
- anim: -1,
|
|
|
- content: '<div class="table"></div>',
|
|
|
- success: function(layero, index) {
|
|
|
- $.ajax({
|
|
|
- url: 'garden_check',
|
|
|
- type: 'post',
|
|
|
- async: false,
|
|
|
- data: {
|
|
|
- ids: id,
|
|
|
- },
|
|
|
- dataType: 'json',
|
|
|
- success: function (data) {
|
|
|
- window.data = data[0]
|
|
|
- layero.find('.table').html(window.data.content)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
// 推荐热门
|
|
|
function hatPush(id,flag){
|
|
|
@@ -368,7 +327,7 @@
|
|
|
var hidden = $('.permission .active').data('type');
|
|
|
var page = $(".layui-laypage-em").next().html();
|
|
|
$.ajax({
|
|
|
- url: 'garden_check_list',
|
|
|
+ url: 'farm_check_list',
|
|
|
type: 'get',
|
|
|
data: { page: page,hidden: hidden },
|
|
|
dataType: 'html',
|