Commit c617a0bc by 汪睦雄

提交修改

parent 10189ca1
...@@ -18,6 +18,7 @@ class Project extends AuthBase ...@@ -18,6 +18,7 @@ class Project extends AuthBase
protected $city_model; protected $city_model;
protected $catalog_model; protected $catalog_model;
protected $project_model; protected $project_model;
protected $appoint_model;
public function _initialize() public function _initialize()
{ {
...@@ -25,6 +26,7 @@ class Project extends AuthBase ...@@ -25,6 +26,7 @@ class Project extends AuthBase
$this->tag_model = model("Tags"); $this->tag_model = model("Tags");
$this->city_model = model("Citys"); $this->city_model = model("Citys");
$this->catalog_model = model("Catalogs"); $this->catalog_model = model("Catalogs");
$this->appoint_model = model("Reservations");
parent::_initialize(); parent::_initialize();
} }
...@@ -214,6 +216,7 @@ class Project extends AuthBase ...@@ -214,6 +216,7 @@ class Project extends AuthBase
$this->assign("tag_list", $tag_list); $this->assign("tag_list", $tag_list);
return $this->fetch(''); return $this->fetch('');
} }
//添加标签 //添加标签
public function addTag() public function addTag()
{ {
...@@ -241,6 +244,7 @@ class Project extends AuthBase ...@@ -241,6 +244,7 @@ class Project extends AuthBase
$this->assign('tag_info', $tag_info); $this->assign('tag_info', $tag_info);
return $this->fetch(); return $this->fetch();
} }
//修改标签 //修改标签
public function updateTag() public function updateTag()
{ {
...@@ -262,6 +266,7 @@ class Project extends AuthBase ...@@ -262,6 +266,7 @@ class Project extends AuthBase
} }
} }
} }
//删除标签 //删除标签
public function deleteTag() public function deleteTag()
{ {
...@@ -278,7 +283,16 @@ class Project extends AuthBase ...@@ -278,7 +283,16 @@ class Project extends AuthBase
} }
} }
//城市管理 // 预约管理
public function appoint()
{
$title = input('get.name', '');
$items = $this->appoint_model->where('nickname', 'like', "%" . $title . "%")->order('id', 'desc')->paginate(15, false, ['query' => ['nickname' => $title]]);
$this->assign("items", $items);
return $this->fetch('');
}
// 城市管理
public function citys() public function citys()
{ {
$title = input('get.name', ''); $title = input('get.name', '');
...@@ -286,6 +300,7 @@ class Project extends AuthBase ...@@ -286,6 +300,7 @@ class Project extends AuthBase
$this->assign("tag_list", $tag_list); $this->assign("tag_list", $tag_list);
return $this->fetch(''); return $this->fetch('');
} }
//添加城市 //添加城市
public function addCity() public function addCity()
{ {
...@@ -305,6 +320,7 @@ class Project extends AuthBase ...@@ -305,6 +320,7 @@ class Project extends AuthBase
} }
} }
} }
public function editCity($id) public function editCity($id)
{ {
$this->assign('id', $id); $this->assign('id', $id);
...@@ -312,6 +328,7 @@ class Project extends AuthBase ...@@ -312,6 +328,7 @@ class Project extends AuthBase
$this->assign('tag_info', $tag_info); $this->assign('tag_info', $tag_info);
return $this->fetch(); return $this->fetch();
} }
//编辑城市 //编辑城市
public function updateCity() public function updateCity()
{ {
...@@ -333,6 +350,7 @@ class Project extends AuthBase ...@@ -333,6 +350,7 @@ class Project extends AuthBase
} }
} }
} }
//删除城市 //删除城市
public function deleteCity() public function deleteCity()
{ {
...@@ -358,6 +376,7 @@ class Project extends AuthBase ...@@ -358,6 +376,7 @@ class Project extends AuthBase
$this->assign("tag_list", $tag_list); $this->assign("tag_list", $tag_list);
return $this->fetch(''); return $this->fetch('');
} }
//添加分类 //添加分类
public function addCatalogs() public function addCatalogs()
{ {
...@@ -399,6 +418,7 @@ class Project extends AuthBase ...@@ -399,6 +418,7 @@ class Project extends AuthBase
$this->assign('tag_info', $tag_info); $this->assign('tag_info', $tag_info);
return $this->fetch(); return $this->fetch();
} }
//编辑分类 //编辑分类
public function updateCatalogs() public function updateCatalogs()
{ {
...@@ -430,6 +450,7 @@ class Project extends AuthBase ...@@ -430,6 +450,7 @@ class Project extends AuthBase
} }
} }
} }
//删除分类 //删除分类
public function deleteCatalog() public function deleteCatalog()
{ {
...@@ -477,6 +498,7 @@ class Project extends AuthBase ...@@ -477,6 +498,7 @@ class Project extends AuthBase
); );
} }
} }
//设置置顶排序 //设置置顶排序
public function setHeat(){ public function setHeat(){
$heat = input('post.heat'); $heat = input('post.heat');
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
{volist name="$comment_list" id="vo" key="k" empty="暂时没有数据"} {volist name="$comment_list" id="vo" key="k" empty="暂时没有数据"}
<tr> <tr>
<td>{$vo.id}</td> <td>{$vo.id}</td>
<td style="text-align: center"> <td>
{if condition="$vo.project"} {if condition="$vo.project"}
<a href="{$vo.project.poster}" target="_blank" data-fancybox="images"> <a href="{$vo.project.poster}" target="_blank" data-fancybox="images">
<img src="{$vo.project.poster}" width='100'> <img src="{$vo.project.poster}" width='100'>
...@@ -57,9 +57,7 @@ ...@@ -57,9 +57,7 @@
</p> </p>
</td> </td>
<td> <td>
{for start="0" end="$vo.grade"} {$vo.grade}分
<span class="glyphicon glyphicon-star" style="color:goldenrod;font-size:16px;"></span>
{/for}
</td> </td>
<td> <td>
<div style="width:250px;">{$vo.content}</div> <div style="width:250px;">{$vo.content}</div>
...@@ -70,15 +68,8 @@ ...@@ -70,15 +68,8 @@
</span> </span>
</td> </td>
<td> <td>
<a href="javascript:" class="btn btn-primary btn-xs check-btn" data-id="{$vo.id}">审核</a> <a href="javascript:" class="btn btn-primary btn-xs check-btn" data-id="{$vo.id}" {if $vo[
'status']!=1}disabled="disabled"{/if}>审核</a>
<!--{if condition="$vo.status == 1"}-->
<!--<a href="{:url('admin/order/commentStatus',['status'=>2,'id'=>$vo.id])}" class="btn btn-xs btn-primary">审核通过</a>-->
<!--<a href="{:url('admin/order/commentStatus',['status'=>3,'id'=>$vo.id])}" class="btn btn-xs btn-warning">审核不通过</a>-->
<!--{else/}-->
<!--<a href="{:url('admin/order/commentStatus',['status'=>1,'id'=>$vo.id])}" class="btn btn-xs btn-primary">退回重审</a>-->
<!--{/if}-->
<!--<a href="##" class="btn btn-xs btn-danger ">删除</a>-->
</td> </td>
</tr> </tr>
{/volist} {/volist}
......
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
<th>用户信息</th> <th>用户信息</th>
<th>订单总价</th> <th>订单总价</th>
<th>订单状态</th> <th>订单状态</th>
<th>微信pay_id</th>
<th>微信交易订单号</th>
<th>微信支付状态</th> <th>微信支付状态</th>
<th>退款状态</th> <th>退款状态</th>
<th>评论状态</th> <th>评论状态</th>
...@@ -64,12 +62,12 @@ ...@@ -64,12 +62,12 @@
<td>{$vo.title}</td> <td>{$vo.title}</td>
<td> <td>
{if condition="$vo.type == 1"} {if condition="$vo.type == 1"}
活动报名订单 活动报名
{else/} {else/}
购买会员卡订单 购买会员卡
{/if} {/if}
</td> </td>
<td style="text-align: center"> <td>
{if condition="$vo.project"} {if condition="$vo.project"}
<a href="{$vo.project.poster}" target="_blank" data-fancybox="images"> <a href="{$vo.project.poster}" target="_blank" data-fancybox="images">
<img src="{$vo.project.poster}" width='100'> <img src="{$vo.project.poster}" width='100'>
...@@ -91,12 +89,6 @@ ...@@ -91,12 +89,6 @@
<span style="color:{$vo.status_name.color}">{$vo.StatusText}</span> <span style="color:{$vo.status_name.color}">{$vo.StatusText}</span>
</td> </td>
<td> <td>
{$vo.prepay_id}
</td>
<td>
{$vo.out_trade_no}
</td>
<td>
{$vo.trade_status} {$vo.trade_status}
</td> </td>
<td> <td>
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
<th>项目信息</th> <th>项目信息</th>
<th>用户信息</th> <th>用户信息</th>
<th>订单总价</th> <th>订单总价</th>
<th>微信pay_id</th>
<th>微信交易订单号</th>
<th>微信支付状态</th> <th>微信支付状态</th>
<th>退款状态</th> <th>退款状态</th>
<th width="150">审核</th> <th width="150">审核</th>
...@@ -56,7 +54,7 @@ ...@@ -56,7 +54,7 @@
购买会员卡订单 购买会员卡订单
{/if} {/if}
</td> </td>
<td style="text-align: center"> <td>
{if condition="$vo.order.project"} {if condition="$vo.order.project"}
<a href="{$vo.order.project.poster}" target="_blank" data-fancybox="images"> <a href="{$vo.order.project.poster}" target="_blank" data-fancybox="images">
<img src="{$vo.order.project.poster}" width='100'> <img src="{$vo.order.project.poster}" width='100'>
...@@ -77,12 +75,6 @@ ...@@ -77,12 +75,6 @@
<td>{$vo.order.total_fee}</td> <td>{$vo.order.total_fee}</td>
<!--订单状态--> <!--订单状态-->
<td> <td>
{$vo.order.prepay_id}
</td>
<td>
{$vo.order.out_trade_no}
</td>
<td>
{$vo.order.trade_status} {$vo.order.trade_status}
</td> </td>
<td> <td>
......
{layout name="public/layout_main"}
<section class="wrapper">
<h3><i class="fa fa-angle-right"></i> 预约管理</h3>
<!-- 分割线 -->
<hr>
<div class="row margin-bottom">
<div class="col-md-12">
<form class="form-inline pull-left" method="GET" action="{:url('admin/project/citys')}" >
<div class="form-group margin-right">
<input class="form-control" type="text" name="name" id="name" value="<?php echo input('title');?>" placeholder="用户名"/>
</div>
<button type="submit" class="btn btn-primary">搜索</button>
</form>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>ID</th>
<th>活动信息</th>
<th>用户信息</th>
<th>姓名</th>
<th>手机号</th>
<th>期望日期</th>
<th>备注</th>
<th>预约时间</th>
</tr>
</thead>
<tbody>
{volist name="items" id="vo" key="k" empty="暂时没有数据"}
<tr id="tr_{$vo.id}">
<td>{$k}</td>
<td>
{if condition="$vo.project"}
<a href="{$vo.project.poster}" target="_blank" data-fancybox="images">
<img src="{$vo.project.poster}" width='100'>
</a>
<p style="padding:0;margin:0;">{$vo.project.title}</p>
{/if}
</td>
<td>
<p style="padding:0;margin:0;text-align:center">{$vo.user_info.nickname}</p>
<p style="padding:0;margin:0;text-align:center">{$vo.user_info.phone}</p>
<p style="padding:0;margin:0;text-align:center;color:#f60">
{if condition="$vo.user_info.is_vip == 1"}
{/if}
</p>
</td>
<td>{$vo.nickname}</td>
<td>{$vo.phone}</td>
<td><?=explode(' ', $vo['expectation_time'])[0]?></td>
<td>{$vo.remark}</td>
<td>{$vo.created_at}</td>
</tr>
{/volist}
</tbody>
</table>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
{$items->render()}
</div>
</div>
</section>
<script type="text/javascript">
// 文档加载完毕之后,会进入该方法
$(function(){
$(".btn-delete").click(function(){
var _this = $(this);
var url = "{:url('admin/project/deleteCity')}";
var oid = _this.attr('oid');
showDialog("提示", "确定删除该城市吗?", function(){
// ajax post 方法
$.post(url, {id:oid}, function (res) {
// var res = JSON.parse(res);
if(res.code == 1){
// javascript 的默认弹出提示方法
_this.remove();
$("#tr_"+oid).fadeOut();
}else{
alert(res.msg);
}
});
});
});
});
</script>
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
</div> </div>
<button type="submit" class="btn btn-primary">搜索</button> <button type="submit" class="btn btn-primary">搜索</button>
</form> </form>
<div class=" pull-left margin-left"> <!-- <div class=" pull-left margin-left">
<a href="{:url('admin/project/addCatalogs')}" class="btn btn-success">添加分类</a> <a href="{:url('admin/project/addCatalogs')}" class="btn btn-success">添加分类</a>
</div> </div> -->
</div> </div>
</div> </div>
...@@ -23,21 +23,13 @@ ...@@ -23,21 +23,13 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered table-striped"> <table class="table table-bordered table-striped">
<!--<colgroup>-->
<!--<col style="width: 2%;">-->
<!--<col style="width: 80%;">-->
<!--<col style="width: 5%;">-->
<!--<col style="width: 5%;">-->
<!--<col style="width: 10%;">-->
<!--</colgroup>-->
<thead> <thead>
<tr> <tr>
<th>#</th> <th>#</th>
<th>分类名称</th> <th>分类名称</th>
<th>分类图标</th> <th>分类图标</th>
<th>排序</th> <th>排序</th>
<th>发布时间</th> <!-- <th>操作</th> -->
<th>操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -51,11 +43,10 @@ ...@@ -51,11 +43,10 @@
</a> </a>
</td> </td>
<td>{$vo.sort}</td> <td>{$vo.sort}</td>
<td>{$vo.created_at}</td> <!-- <td>
<td>
<a href="{:url('admin/project/editCatalogs',['id'=>$vo.id])}" class="btn btn-xs btn-primary"><i class="fa fa-pencil"></i></a> <a href="{:url('admin/project/editCatalogs',['id'=>$vo.id])}" class="btn btn-xs btn-primary"><i class="fa fa-pencil"></i></a>
<a href="javascript:" oid="{$vo.id}" class="btn btn-xs btn-danger btn-delete"><i class="fa fa-trash"></i></a> <a href="javascript:" oid="{$vo.id}" class="btn btn-xs btn-danger btn-delete"><i class="fa fa-trash"></i></a>
</td> </td> -->
</tr> </tr>
{/volist} {/volist}
</tbody> </tbody>
......
...@@ -52,6 +52,16 @@ ...@@ -52,6 +52,16 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="title" class="col-sm-2 control-label text-right">分类</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<select class="form-control selectpicker" name='catalog_id' id="catalog_id" data-live-search="true">
{volist name="catalog_list" id="vo"}
<option value="{$vo.id}" {if condition="$vo.id==$project_info.catalog_id"}selected{/if}>{$vo.name}</option>
{/volist}
</select>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right">国内/国外</label> <label for="title" class="col-sm-2 control-label text-right">国内/国外</label>
<div class="col-sm-10 col-md-8 col-lg-6"> <div class="col-sm-10 col-md-8 col-lg-6">
<select name="region_type" id="region_type" class="form-control"> <select name="region_type" id="region_type" class="form-control">
...@@ -85,16 +95,6 @@ ...@@ -85,16 +95,6 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="title" class="col-sm-2 control-label text-right">分类</label>
<div class="col-sm-10 col-md-8 col-lg-6">
<select class="form-control selectpicker" name='catalog_id' id="catalog_id" data-live-search="true">
{volist name="catalog_list" id="vo"}
<option value="{$vo.id}" {if condition="$vo.id==$project_info.catalog_id"}selected{/if}>{$vo.name}</option>
{/volist}
</select>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label text-right">城市</label> <label for="title" class="col-sm-2 control-label text-right">城市</label>
<div class="col-sm-10 col-md-8 col-lg-6"> <div class="col-sm-10 col-md-8 col-lg-6">
<select class="form-control selectpicker" name='city' id="city" data-live-search="true"> <select class="form-control selectpicker" name='city' id="city" data-live-search="true">
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<span class="form-group-tip"> 经纬度在地图上搜索并复制粘贴过来即可, <a href="http://www.gpsspg.com/maps.htm" target="_blank">立即查看地图</a></span> <span class="form-group-tip"> 经纬度在地图上搜索并复制粘贴过来即可, <a href="http://www.gpsspg.com/maps.htm" target="_blank">立即查看地图</a></span>
</div> </div>
</div> </div>
<div class="form-group type_toggle" {if condition="$project_info.type==2"} style="display:none"{/if}> <div class="form-group" {if condition="$project_info.type==2"} style="display:none"{/if}>
<label for="title" class="col-sm-2 control-label text-right">价格</label> <label for="title" class="col-sm-2 control-label text-right">价格</label>
<div class="col-sm-10 col-md-8 col-lg-6"> <div class="col-sm-10 col-md-8 col-lg-6">
<input type="text" class="form-control validate[required,custom[number]]" name="" id="price" placeholder="价格" value="{$project_info.price}"> <input type="text" class="form-control validate[required,custom[number]]" name="" id="price" placeholder="价格" value="{$project_info.price}">
...@@ -211,7 +211,7 @@ $(function(){ ...@@ -211,7 +211,7 @@ $(function(){
if($(this).val() == 1){ if($(this).val() == 1){
$(".type_toggle").fadeIn(); $(".type_toggle").fadeIn();
$(".type_toggle_2").fadeOut(); $(".type_toggle_2").fadeOut();
$(".type_toggle").children('input').removeAttr('disabled'); $(".type_toggle").find('input').removeAttr('disabled');
}else{ }else{
$(".type_toggle").fadeOut(); $(".type_toggle").fadeOut();
$(".type_toggle").find('input').attr('disabled',true); $(".type_toggle").find('input').attr('disabled',true);
......
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
<li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='updateproject')){echo 'class="active"';}?>> <li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='updateproject')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Project/index")?>">活动/商家列表</a> <a href="<?php echo url("@admin/Project/index")?>">活动/商家列表</a>
</li> </li>
<li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='appoint')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Project/appoint")?>">预约列表</a>
</li>
<li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='catalogs'||ACTION_NAME=='editcatalogs'||ACTION_NAME=='addcatalogs')){echo 'class="active"';}?>> <li <?php if(CONTROLLER_NAME == 'Project'&&(ACTION_NAME=='catalogs'||ACTION_NAME=='editcatalogs'||ACTION_NAME=='addcatalogs')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Project/catalogs")?>">分类管理</a> <a href="<?php echo url("@admin/Project/catalogs")?>">分类管理</a>
</li> </li>
...@@ -63,24 +66,25 @@ ...@@ -63,24 +66,25 @@
</li> </li>
<li class="sub-menu"> <li class="sub-menu">
<a <?php if(in_array(CONTROLLER_NAME, array('Banner','Guide'))){echo 'class="active"';}?> href="javascript:void(0);" > <a <?php if(in_array(CONTROLLER_NAME, array('Banner','Guide', 'Business'))){echo 'class="active"';}?> href="javascript:void(0);" >
<i class="fa fa-snowflake-o"></i> <i class="fa fa-snowflake-o"></i>
<span>内容管理</span> <span>内容管理</span>
</a> </a>
<ul class="sub"> <ul class="sub">
<li <?php if(CONTROLLER_NAME == 'Banner'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='update')){echo 'class="active"';}?>> <li <?php if(CONTROLLER_NAME == 'Banner'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='update')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Banner/index")?>">Banner广告位</a> <a href="<?php echo url("@admin/Banner/index")?>">广告管理</a>
</li> </li>
<li <?php if(CONTROLLER_NAME == 'Guide'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='update')){echo 'class="active"';}?>> <li <?php if(CONTROLLER_NAME == 'Guide'&&(ACTION_NAME=='index'||ACTION_NAME=='create'||ACTION_NAME=='update')){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Guide/index")?>">美行攻略</a> <a href="<?php echo url("@admin/Guide/index")?>">美行攻略</a>
</li> </li>
<li <?php if(CONTROLLER_NAME == 'Business'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Business/index")?>">商家入住</a>
</li>
</ul> </ul>
</li> </li>
<li class="sub-menu"> <li class="sub-menu">
<a <?php if(in_array(CONTROLLER_NAME, array('Log', 'Post','Business'))){echo 'class="active"';}?> href="javascript:void(0);" > <a <?php if(in_array(CONTROLLER_NAME, array('Log','Post'))){echo 'class="active"';}?> href="javascript:void(0);" >
<i class="fa fa-cog"></i> <i class="fa fa-cog"></i>
<span>其他管理</span> <span>其他管理</span>
</a> </a>
...@@ -88,10 +92,6 @@ ...@@ -88,10 +92,6 @@
<li <?php if(CONTROLLER_NAME == 'Log'&&ACTION_NAME=='index'){echo 'class="active"';}?>> <li <?php if(CONTROLLER_NAME == 'Log'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Log/index", ['level'=>'info'])?>">日志信息</a> <a href="<?php echo url("@admin/Log/index", ['level'=>'info'])?>">日志信息</a>
</li> </li>
<li <?php if(CONTROLLER_NAME == 'Business'&&ACTION_NAME=='index'){echo 'class="active"';}?>>
<a href="<?php echo url("@admin/Business/index")?>">商家入住</a>
</li>
</ul> </ul>
</li> </li>
......
...@@ -8,8 +8,19 @@ ...@@ -8,8 +8,19 @@
namespace app\common\model; namespace app\common\model;
class Reservations extends BaseModel class Reservations extends BaseModel
{ {
protected $table = 'mr_reservations'; protected $table = 'mr_reservations';
//获取订单商品
public function project()
{
return $this->belongsTo('Project', 'pid', 'id');
}
//获取下单用户信息
public function userInfo()
{
return $this->belongsTo('User', 'uid', 'id');
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment