作者 徐治堂

项目后台完成

<?php
/**
* Created by PhpStorm.
* User: wz
* Date: 2018/7/4
* Time: 17:23
*/
namespace app\admin\controller;
use app\admin\model\ZjOrderModel;
use cmf\controller\AdminBaseController;
use think\Db;
class DataStatiController extends AdminBaseController
{
public function index()
{
$where=[];
$where1=[];
$date=date('Y-m-d');
$date1=date('Y-m-d',strtotime('+1 day'));
$time=strtotime($date);
$time1=strtotime($date1);
$where['create_time']=['egt',$time];
$where1['create_time']=['lt',$time1];
$order=new ZjOrderModel();
$num['0']=$order->orderNum($where,$where1);
$price['0']=$order->priceNum($where,$where1);
$data=date('w')-1;
$data1=8-date('w');
$date= date('Y-m-d',strtotime("-$data day"));
$date1=date('Y-m-d',strtotime("+$data1 day"));
$time=strtotime($date);
$time1=strtotime($date1);
$where['create_time']=['egt',$time];
$where1['create_time']=['lt',$time1];
$order=new ZjOrderModel();
$num['1']=$order->orderNum($where,$where1);
$price['1']=$order->priceNum($where,$where1);
$data=date('m')+1;
$date=date('Y-m-1');
if ($data=='13'){
$data=$date('Y')+1;
$date1=date("$data-1-1");
}else{
$date1=date("Y-$data-1");
}
$time=strtotime($date);
$time1=strtotime($date1);
$where['create_time']=['egt',$time];
$where1['create_time']=['lt',$time1];
$order=new ZjOrderModel();
$num['2']=$order->orderNum($where,$where1);
$price['2']=$order->priceNum($where,$where1);
$this->assign('num',$num);
$this->assign('price',$price);
return $this->fetch();
}
}
\ No newline at end of file
... ...
<?php
/**
* Created by PhpStorm.
* User: wz
* Date: 2018/7/4
* Time: 16:42
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
class ZjComment extends AdminBaseController
{
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: wz
* Date: 2018/7/4
* Time: 16:42
*/
namespace app\admin\controller;
use ClassesWithParents\D;
use cmf\controller\AdminBaseController;
use think\Db;
class ZjCommentController extends AdminBaseController
{
/**
* 评论管理首页
*/
public function index()
{
$where=[];
if ($this->request->isPost()){
$in=input('post.');
if (strlen($in['ser_type'])>'0'){
$where['s.ser_type']=$in['ser_type'];
}
if (strlen($in['name'])>'0'){
$where['s.id']=$in['name'];
}
if (strlen($in['level'])>'0'){
$where['c.level']=$in['level'];
}
}
$com=Db::name('zj_comment')->alias('c')->join('user u','c.user_id=u.id')->join('zj_service s','c.service_id=s.id')->field('c.*,u.user_nickname as uname')->where($where)->paginate('10');
$service=Db::name('zj_service')->field('id,name,ser_type')->select();//查询服务名称 联动筛选
$this->assign('allservice',$service);
$this->assign('allcom',$com);
return $this->fetch();
}
/**
* 评论显示与隐藏
*/
public function comstate()
{
$param=$this->request->param();
if ($param){
$id=$this->request->param('ids/a');
if ($param['yes']=='1'){
$com=Db::name('zj_comment')->where(['id'=>['in',$id]])->update(['is_sta'=>'1']);
}else{
$com=Db::name('zj_comment')->where(['id'=>['in',$id]])->update(['is_sta'=>'0']);
}
if ($com){
$this->success('评论可见度修改成功','');
}else{
$this->error('评论可见度修改失败');
}
}
}
/**
* 删除评论
*/
public function delete()
{
if ($this->request->param()){
$id=$this->request->param('ids/a');
$del=Db::name('zj_comment')->where(['id'=>['in',$id]])->delete();
if($del){
$this->success('评论删除成功','');
}else{
$this->error('评论删除失败');
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -32,6 +32,9 @@ class ZjOrderController extends AdminBaseController
if (strlen($in['ser_type'])>'0'){
$where['s.ser_type']=$in['ser_type'];
}
if (strlen($in['order_num'])>'0'){
$where['o.order_num']=$in['order_num'];
}
}
$admin=Db::name('role_user')->field('user_id')->where('role_id','3')->select();
foreach ($admin as $k=>$val){
... ... @@ -40,6 +43,25 @@ class ZjOrderController extends AdminBaseController
$aname=Db::name('user')->field('user_login,id')->where(['id'=>['in',$id]])->select();
$order=new ZjOrderModel();
$all=$order->selectAll($where);
$aa=['0','0','0','0'];
$zd=['0','0','0'];
foreach ($all as $k=>$val){
if ($val['order_type']=='0'){
$aa['1']+=$val['whole'];
$zd['0']+='1';
}elseif ($val['order_type']=='1'){
$aa['2']+=$val['whole'];
$zd['1']+='1';
}else{
$aa['3']+=$val['whole'];
$zd['2']+='1';
}
}
$ser=Db::name('zj_service_type')->select();
$this->assign('aa',$aa);
$this->assign('zd',$zd);
$this->assign('ser',$ser);
$this->assign('allorder',$all);
$this->assign('admin',$aname);
... ... @@ -59,7 +81,7 @@ class ZjOrderController extends AdminBaseController
$where['s.ser_type']=$in['ser_type'];
}
if (strlen($in['name'])>'0'){
$where['s.name']=$in['name'];
$where['s.id']=$in['name'];
}
if (strlen($in['date_min'])>'0'){
$where['o.contact_date']=['egt',$in['date_min']];
... ... @@ -73,10 +95,12 @@ class ZjOrderController extends AdminBaseController
}
$service=Db::name('zj_service')->field('id,name,ser_type')->select();//查询服务价格 我的订单联动筛选
$service=Db::name('zj_service')->field('id,name,ser_type')->select();//查询服务名称 我的订单联动筛选
$contact=Db::name('zj_contact')->select();//预约具体时间
$order=new ZjOrderModel();
$all=$order->selectAll($where);
$ser=Db::name('zj_service_type')->select();
$this->assign('ser',$ser);
$this->assign('allcon',$contact);
$this->assign('allorder',$all);
$this->assign('allservice',$service);
... ... @@ -114,7 +138,6 @@ class ZjOrderController extends AdminBaseController
$this->assign('admin',$aname);
return $this->fetch();
}
}
/**
... ... @@ -134,7 +157,7 @@ class ZjOrderController extends AdminBaseController
$where['o.order_type']=$in['order_type'];
}
if (strlen($in['name'])>'0'){
$where['s.name']=$in['name'];
$where['s.id']=$in['name'];
}
if (strlen($in['date_min'])>'0'){
$where['o.contact_date']=['egt',$in['date_min']];
... ... @@ -145,12 +168,17 @@ class ZjOrderController extends AdminBaseController
if (strlen($in['contact_time'])>'0'){
$where['o.contact_time']=$in['contact_time'];
}
if (strlen($in['order_num'])>'0'){
$where['o.order_num']=$in['order_num'];
}
}
$service=Db::name('zj_service')->field('id,name,ser_type')->select();//查询服务名称 我的订单联动筛选
$contact=Db::name('zj_contact')->select();//预约具体时间
$order=new ZjOrderModel();
$all=$order->selectAll($where);
$ser=Db::name('zj_service_type')->select();
$this->assign('ser',$ser);
$this->assign('allcon',$contact);
$this->assign('allorder',$all);
$this->assign('allservice',$service);
... ...
... ... @@ -19,7 +19,8 @@ class ZjServiceController extends AdminBaseController
*/
public function index()
{
$all=Db::name('zj_service')->field('id,ser_type,name,price_ori,price_new,describes,apply,create_time,update_time,is_dis,is_rec');
$all=Db::name('zj_service')->alias('s')->join('zj_service_type t','s.ser_type=t.id')
->field('s.id,s.ser_type,s.name,s.price_ori,s.price_new,s.describes,s.apply,s.create_time,s.update_time,s.is_dis,s.is_rec,t.name as tname');
if ($this->request->isPost()){
$arr=input('post.');
//搜索条件
... ... @@ -36,6 +37,8 @@ class ZjServiceController extends AdminBaseController
}
$all=$all->order('id','asc')->paginate(10);
$ser=Db::name('zj_service_type')->select();
$this->assign('ser',$ser);
$this->assign('allser',$all);
return $this->fetch();
}
... ... @@ -44,6 +47,8 @@ class ZjServiceController extends AdminBaseController
*/
public function add()
{
$ser=Db::name('zj_service_type')->select();
$this->assign('ser',$ser);
return $this->fetch();
}
... ... @@ -86,6 +91,8 @@ class ZjServiceController extends AdminBaseController
if ($this->request->param()){
$id=input('param.id');
$one=Db::name('zj_service')->where('id',$id)->find();
$ser=Db::name('zj_service_type')->select();
$this->assign('ser',$ser);
$this->assign('one',$one);
return $this->fetch();
}
... ... @@ -183,4 +190,21 @@ class ZjServiceController extends AdminBaseController
}
}
/**
*添加服务分类
*/
public function addType()
{
if ($this->request->param()){
$name=input('param.name');
$type=Db::name('zj_service_type')->insert(['name'=>$name]);
if ($type){
$this->success('增加分类成功','');
}else{
$this->error('增加分类失败');
}
}
return $this->fetch();
}
}
\ No newline at end of file
... ...
... ... @@ -14,12 +14,32 @@ use think\Db;
class ZjOrderModel extends Model
{
/**
* 获取订单数据
*/
public function selectAll($where)
{
$all=Db::name('zj_order')->alias('o')->join('zj_service s','o.service_id=s.id')->join('user u','o.user_id=u.id')->join('zj_contact c','o.contact_time=c.id')->join('user y','o.admin_id=y.id','left')
->field('o.*,s.ser_type,s.name as sname,u.user_nickname as uname,y.user_login as aname,c.contact')
$all=Db::name('zj_order')->alias('o')->join('zj_service s','o.service_id=s.id')->join('user u','o.user_id=u.id')->join('zj_contact c','o.contact_time=c.id')->join('user y','o.admin_id=y.id','left')->join('zj_service_type t','s.ser_type=t.id')
->field('o.*,s.ser_type,s.name as sname,u.user_nickname as uname,y.user_login as aname,c.contact,t.name as tname')
->where($where)->order('o.create_time','desc')->paginate(10);
return $all;
}
/**
* 新增订单数量统计
*/
public function orderNum($where,$where1)
{
return Db::name('zj_order')->where($where)->where($where1)->count('id');
}
/**
* 新增订单金额统计
*/
public function priceNum($where,$where1)
{
return Db::name('zj_order')->where($where)->where($where1)->sum('whole');
}
}
\ No newline at end of file
... ...
... ... @@ -88,7 +88,7 @@ class PortalCategoryModel extends Model
$tpl = "<tr>
<td><input name='list_orders[\$id]' type='text' size='3' value='\$list_order' class='input-order'></td>
<td>\$id</td>
<td>\$spacer <a href='\$url' target='_blank'>\$name</a></td>
<td>\$spacer \$name</td>
<td>\$description</td>
<td>\$str_action</td>
</tr>";
... ...
... ... @@ -94,13 +94,27 @@ class AdminIndexController extends AdminBaseController
*/
public function ban()
{
$id = input('param.id', 0, 'intval');
$id = input('param.id');
$phone = input('param.mobile');
$result=true;
if ($id) {
$result = Db::name("user")->where(["id" => $id, "user_type" => 2])->setField('user_status', 0);
Db::startTrans();
try{
Db::name('user')->where(["id" => $id, "user_type" => 2])->setField('user_status', 0);
Db::name('zj_deluser')->insert(['phone'=>$phone]);
// 提交事务
Db::commit();
$result=true;
} catch (\Exception $e) {
// 回滚事务
Db::rollback();
$result=false;
}
if ($result) {
$this->success("会员拉黑成功!", "adminIndex/index");
} else {
$this->error('会员拉黑失败,会员不存在,或者是管理员!');
$this->error('会员拉黑失败!');
}
} else {
$this->error('数据传入失败!');
... ... @@ -122,25 +136,30 @@ class AdminIndexController extends AdminBaseController
*/
public function cancelBan()
{
$id = input('param.id', 0, 'intval');
$id = input('param.id');
$phone = input('param.mobile');
$result=true;
if ($id) {
Db::name("user")->where(["id" => $id, "user_type" => 2])->setField('user_status', 1);
$this->success("会员启用成功!", '');
Db::startTrans();
try{
Db::name('user')->where(["id" => $id, "user_type" => 2])->setField('user_status', 1);
Db::name('zj_deluser')->where('phone',$phone)->delete();
// 提交事务
Db::commit();
$result=true;
} catch (\Exception $e) {
// 回滚事务
Db::rollback();
$result=false;
}
if ($result) {
$this->success("会员启用成功!", '');
} else {
$this->error('会员启用失败!');
}
} else {
$this->error('数据传入失败!');
}
}
/**
* 用户删除
*/
public function delete()
{
$id = $this->request->param('id', 0, 'intval');
if (Db::name('user')->delete($id) !== false) {
$this->success("删除成功!");
} else {
$this->error("删除失败!");
}
}
}
... ...
<?php
return array (
'ADMIN_DATASTATI_INDEX' => '数据统计',
'ADMIN_HOOK_INDEX' => '钩子管理',
'ADMIN_HOOK_PLUGINLISTORDER' => '钩子插件排序',
'ADMIN_HOOK_PLUGINS' => '钩子插件管理',
... ... @@ -118,14 +119,17 @@ return array (
'ADMIN_USER_INDEX' => '管理员',
'ADMIN_USER_USERINFO' => '个人信息',
'ADMIN_USER_USERINFOPOST' => '管理员个人信息修改提交',
'ADMIN_ZJCOMMENT_INDEX' => '评论管理',
'ADMIN_ZJORDER_DEFAULT' => '订单管理',
'ADMIN_ZJORDER_ETC' => '待分配订单',
'ADMIN_ZJORDER_INDEX' => '全部订单',
'ADMIN_ZJORDER_MEORDER' => '我的订单',
'ADMIN_ZJSERVICE_ADD' => '添加服务',
'ADMIN_ZJSERVICE_ADDPOST' => '添加服务提交',
'ADMIN_ZJSERVICE_ADDTYPE' => '添加服务分类',
'ADMIN_ZJSERVICE_DEFAULT' => '服务管理',
'ADMIN_ZJSERVICE_DELETE' => '删除服务',
'ADMIN_ZJSERVICE_INDEX' => '服务管理',
'ADMIN_ZJSERVICE_INDEX' => '全部服务',
'ADMIN_ZJSERVICE_PUBLISH' => '发布与取消发布服务',
'ADMIN_ZJSERVICE_RECOMMEND' => '推荐与取消推荐服务',
'ADMIN_ZJ_REWARD_INDEX' => '分享佣金',
... ...
<include file="public@header"/>
<style>
div.data{
width: 200px;
height: 150px;
text-align: center;
margin: 20px;
background: #55ACEE;
color:white;
}
div.data p{
font-size: 18px;
font-weight: 900;
margin-top: 20px;
}
div.data span{
font-size: 40px;
font-weight: 900;
}
</style>
</head>
<body>
<div class="wrap js-check-wrap">
<div class="row">
<div class="col-md-1 data">
<p>今日新增订单</p>
<span>{$num.0}</span>
</div>
<div class="col-md-1 data">
<p>本周新增订单</p>
<span>{$num.1}</span>
</div>
<div class="col-md-1 data">
<p>本月新增订单</p>
<span>{$num.2}</span>
</div>
</div>
<div class="row">
<div class="col-md-1 data">
<p>今日订单金额</p>
<span>{$price.0}</span>
</div>
<div class="col-md-1 data">
<p>本周订单金额</p>
<span>{$price.1}</span>
</div>
<div class="col-md-1 data">
<p>本月订单金额</p>
<span>{$price.2}</span>
</div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
... ...
<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a>评论管理</a></li>
</ul>
<form class="well form-inline margin-top-20" method="post" action="{:url('zj_comment/index')}">
服务分类:
<select class="form-control" name="ser_type" id="classo" onchange="teacherChange(this.options[this.selectedIndex].value)">
<option value>选择服务类别</option>
<option value="0">简历服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
</select>&nbsp;&nbsp;
服务名称:
<select class="form-control" id="classobj" name="name">
<option value>选择服务名称</option>
<foreach name="allservice" item="val">
<option value="{$val.id}">{$val.name}</option>
</foreach>
</select>&nbsp;&nbsp;
评论星级:
<select class="form-control" name="level">
<option value>选择星级</option>
<option value="1">1星</option>
<option value="2">2星</option>
<option value="3">3星</option>
<option value="4">4星</option>
<option value="5">5星</option>
</select>&nbsp;&nbsp;
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('zj_comment/index')}">清空</a>
</form>
<form action="" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="table-actions">
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('zj_comment/comstate',array('yes'=>'1'))}" data-subcheck="true">
显示
</button>
<button class="btn btn-primary btn-sm js-ajax-submit" type="submit" data-action="{:url('zj_comment/comstate',array('yes'=>'0'))}" data-subcheck="true">
隐藏
</button>
<button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
data-action="{:url('zj_comment/delete')}" data-subcheck="true" data-msg="您确定删除吗?">
删除
</button>
</div>
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="15">
<label>
<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
</label>
</th>
<th>评论用户</th>
<th>所购服务</th>
<th>评论星级</th>
<th>评论时间</th>
<th>评论内容</th>
<th>评论状态</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<foreach name="allcom" item="vo">
<tr>
<td>
<input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
value="{$vo.id}" title="ID:{$vo.id}">
</td>
<td>{$vo['uname']}</td>
<td>{$vo['ser_name']}</td>
<td>{$vo['level']}星</td>
<td>{:date('Y-m-d H-i-s',$vo['create_time'])}</td>
<td>{$vo['content']}</td>
<td>
<if condition="$vo['is_sta'] eq 0">
未显示
<else>
已显示
</if>
</td>
<td>
<a href="{:url('zj_order/one',array('id'=>$vo['order_id']))}">关联订单详情</a>
<a class="js-ajax-delete" href="{:url('zj_comment/delete',array('ids'=>$vo['id']))}">删除评论</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$allcom->render()}</div>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
var ar1={:json_encode($allservice)};//后台传入服务名称
//当选择指向类时改变目标的下拉菜单
function teacherChange(area){
var tobj=document.getElementById('classobj');
removeAllOptions(tobj);
var option = document.createElement("option");
option.text = "选择服务名称";
option.value = "";
tobj.add(option);
for(m=0;m<ar1.length;m++){
if (ar1[m]['ser_type']==area&&area!=''){
var option = document.createElement("option");
option.text = ar1[m]['name'];
option.value = ar1[m]['id'];
tobj.add(option);
}else if(area==''){
var option = document.createElement("option");
option.text = ar1[m]['name'];
option.value = ar1[m]['id'];
tobj.add(option);
}
}
}
//移除option 当中所有元素
function removeAllOptions(selectbox)
{
var i;
for(i=selectbox.options.length-1;i>=0;i--)
{
selectbox.remove(i);
}
}
</script>
</body>
</html>
... ...
... ... @@ -9,17 +9,17 @@
服务分类:
<select class="form-control" name="ser_type" id="classo" onchange="teacherChange(this.options[this.selectedIndex].value)">
<option value>选择服务类别</option>
<option value="0">简历服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
</select>
<foreach name="ser" item="vo">
<option value="{$vo.id}">{$vo.name}</option>
</foreach>
</select>&nbsp;&nbsp;
服务名称:
<select class="form-control" id="classobj" name="name">
<option value>选择服务名称</option>
<foreach name="allservice" item="val">
<option value="{$val.id}">{$val.name}</option>
</foreach>
</select>
</select>&nbsp;&nbsp;
预约时间:
<input type="date" class="form-control time" name="date_min">
-
... ... @@ -29,13 +29,13 @@
<foreach name="allcon" item="val">
<option value="{$val.id}">{$val['contact']}</option>
</foreach>
</select>
</select>&nbsp;&nbsp;
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('zj_order/etc')}">清空</a>
</form>
<form class="form-inline" action="{:url('zj_order/etcten')}" method="post">
<div class="table-actions">
<button class="btn btn-primary btn-sm" type="submit" data-subcheck="true" onclick="ck()">
<button class="btn btn-primary btn-sm" type="submit" data-subcheck="true">
分配导师
</button>
</div>
... ... @@ -47,9 +47,6 @@
<input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
</label>
</th>
<notempty name="category">
<th width="50">{:lang('SORT')}</th>
</notempty>
<th>订单编号</th>
<th>所购服务</th>
<th>服务分类</th>
... ... @@ -69,15 +66,7 @@
</td>
<td>{$vo['order_num']}</td>
<td>{$vo['sname']}</td>
<td>
<if condition="$vo['ser_type'] eq 0">
简历服务
<elseif condition="$vo['ser_type'] eq 1">
职业规划
<elseif condition="$vo['ser_type'] eq 2">
面试辅导
</if>
</td>
<td>{$vo['tname']}</td>
<td>{$vo['uname']}</td>
<td>{$vo['phone']}</td>
<td>
... ...
... ... @@ -35,15 +35,7 @@
</td>
<td>{$vo['order_num']}</td>
<td>{$vo['sname']}</td>
<td>
<if condition="$vo['ser_type'] eq 0">
简历服务
<elseif condition="$vo['ser_type'] eq 1">
职业规划
<elseif condition="$vo['ser_type'] eq 2">
面试辅导
</if>
</td>
<td>{$vo['tname']}</td>
<td>{$vo['uname']}</td>
<td>{$vo['phone']}</td>
<td>
... ...
... ... @@ -15,22 +15,23 @@
<option value="3">已分配</option>
<option value="4">待评论</option>
<option value="5">已完成</option>
</select>
</select>&nbsp;&nbsp;
导师:
<select class="form-control" name="aid">
<option value>选择导师</option>
<foreach name="admin" item="val">
<option value="{$val.id}">{$val.user_login}</option>
</foreach>
</select>
</select>&nbsp;&nbsp;
服务分类:
<select class="form-control" name="ser_type">
<option value>选择服务分类</option>
<option value="0">简历服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
</select>
<foreach name="ser" item="vo">
<option value="{$vo.id}">{$vo.name}</option>
</foreach>
</select>&nbsp;&nbsp;
订单编号:
<input type="text" name="order_num" placeholder="请输入12位订单编号" class="form-control">&nbsp;&nbsp;
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('zj_order/index')}">清空</a>
</form>
... ... @@ -57,15 +58,7 @@
<tr>
<td>{$vo['order_num']}</td>
<td>{$vo['sname']}</td>
<td>
<if condition="$vo['ser_type'] eq 0">
简历服务
<elseif condition="$vo['ser_type'] eq 1">
职业规划
<elseif condition="$vo['ser_type'] eq 2">
面试辅导
</if>
</td>
<td>{$vo['tname']}</td>
<td>{$vo['uname']}</td>
<td>{$vo['name']}</td>
<td>
... ... @@ -126,6 +119,44 @@
</foreach>
</tbody>
</table>
<table class="table table-bordered" style="width: 80%;">
<thead>
<tr>
<th style="width: 25%;">已取消订单数量</th>
<th style="width: 25%;">未支付订单数量</th>
<th style="width: 25%;">已支付订单数量</th>
<th style="width: 25%;">总订单数量</th>
</tr>
</thead>
<tbody>
<tr>
<td>{$zd.0}</td>
<td>{$zd.1}</td>
<td>{$zd.2}</td>
<td>{$zd['0']+$zd['1']+$zd['2']}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered" style="width: 100%;">
<thead>
<tr>
<th style="width: 20%;">已取消订单金额</th>
<th style="width: 20%;">未支付订单金额</th>
<th style="width: 20%;">已支付订单金额</th>
<th style="width: 20%;">未支付加已支付订单金额</th>
<th style="width: 20%;">所有订单总金额</th>
</tr>
</thead>
<tbody>
<tr>
<td>{$aa.1}</td>
<td>{$aa.2}</td>
<td>{$aa.3}</td>
<td>{$aa['2']+$aa['3']}</td>
<td>{$aa['1']+$aa['2']+$aa['3']}</td>
</tr>
</tbody>
</table>
<div class="pagination">{$allorder->render()}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
... ...
... ... @@ -9,10 +9,10 @@
服务分类:
<select class="form-control" name="ser_type" id="classo" onchange="teacherChange(this.options[this.selectedIndex].value)">
<option value>选择服务类别</option>
<option value="0">简历服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
</select>
<foreach name="ser" item="vo">
<option value="{$vo.id}">{$vo.name}</option>
</foreach>
</select>&nbsp;&nbsp;
服务名称:
<select class="form-control" id="classobj" name="name">
... ... @@ -20,24 +20,26 @@
<foreach name="allservice" item="val">
<option value="{$val.id}">{$val.name}</option>
</foreach>
</select>
</select>&nbsp;&nbsp;
订单状态:
<select class="form-control" name="order_type">
<option value>选择订单状态</option>
<option value="3">未完成</option>
<option value="4">待评论</option>
<option value="5">订单完成</option>
</select>
预约时间:
<input type="date" class="form-control time" name="date_min">
</select>&nbsp;&nbsp;
预约时间:
<input type="date" class="form-control time" name="date_min" style="width: 150px;">
-
<input type="date" class="form-control time" name="date_max">
<input type="date" class="form-control time" name="date_max" style="width: 150px;">
<select class="form-control" name="contact_time">
<option value>选择时间</option>
<foreach name="allcon" item="val">
<option value="{$val.id}">{$val['contact']}</option>
</foreach>
</select>
</select>&nbsp;&nbsp;<br/>
订单编号:
<input type="text" name="order_num" placeholder="请输入12位订单编号" class="form-control">&nbsp;&nbsp;
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('zj_order/meorder')}">清空</a>
</form>
... ... @@ -59,15 +61,7 @@
<tr>
<td>{$vo['order_num']}</td>
<td>{$vo['sname']}</td>
<td>
<if condition="$vo['ser_type'] eq 0">
简历服务
<elseif condition="$vo['ser_type'] eq 1">
职业规划
<elseif condition="$vo['ser_type'] eq 2">
面试辅导
</if>
</td>
<td>{$vo['tname']}</td>
<td>{$vo['uname']}</td>
<td>{$vo['name']}</td>
<td>
... ... @@ -91,13 +85,7 @@
<script src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
var time=new Date();
var year=time.getFullYear();
var month=time.getMonth()+1 < 10 ?'0'+(time.getMonth()+1):time.getMonth()+1;
var date=time.getDate() < 10?'0'+(time.getDate()-2):time.getDate()-2;
$('.time').attr('min',year+'-'+month+'-'+date);
var ar1={:json_encode($allservice)};//后台传入服务价格
var ar1={:json_encode($allservice)};//后台传入服务名称
//当选择指向类时改变目标的下拉菜单
function teacherChange(area){
var tobj=document.getElementById('classobj');
... ... @@ -131,8 +119,6 @@
}
}
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -24,15 +24,7 @@
</tr>
<tr>
<th>服务分类</th>
<td>
<if condition="$one['ser_type'] eq 0">
简历服务
<elseif condition="$one['ser_type'] eq 1">
职业规划
<elseif condition="$one['ser_type'] eq 2">
面试辅导
</if>
</td>
<td>{$one['tname']}</td>
</tr>
<tr>
<th>服务价格</th>
... ...
... ... @@ -33,9 +33,9 @@
<label for="input-ser-ser" class="col-sm-2 control-label"><span class="form-required">*</span>服务分类</label>
<div class="col-md-6 col-sm-10">
<select class="form-control" name="ser_type" id="input-ser-ser">
<option value="0">咨询服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
<foreach name="ser" item="val">
<option value="{$val.id}">{$val.name}</option>
</foreach>
</select>
</div>
</div>
... ...
<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="#A" data-toggle="tab">添加服务分类</a></li>
</ul>
<form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('zj_service/addType')}" method="post">
<fieldset>
<div class="tabbable">
<div class="tab-content">
<div class="tab-pane active" id="A">
<div class="form-group">
<label for="input-ser-type" class="col-sm-2 control-label"><span class="form-required">*</span>服务分类</label>
<div class="col-md-6 col-sm-10">
<input type="text" class="form-control" id="input-ser-type" name="name" placeholder="请输入新的分类">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -34,9 +34,9 @@
<label for="input-ser-ser" class="col-sm-2 control-label">服务分类</label>
<div class="col-md-6 col-sm-10">
<select class="form-control" name="ser_type" id="input-ser-ser">
<option value="0" <if condition="$one['ser_type'] eq 0">selected</if>>咨询服务</option>
<option value="1" <if condition="$one['ser_type'] eq 1">selected</if>>职业规划</option>
<option value="2" <if condition="$one['ser_type'] eq 2">selected</if>>面试辅导</option>
<foreach name="ser" item="val">
<option value="{$val.id}" <if condition="$val['id'] eq $one.ser_type">selected</if>>{$val.name}</option>
</foreach>
</select>
</div>
</div>
... ...
... ... @@ -10,9 +10,9 @@
服务分类:
<select class="form-control" name="ser_type">
<option value>选择服务类别</option>
<option value="0">简历服务</option>
<option value="1">职业规划</option>
<option value="2">面试辅导</option>
<foreach name="ser" item="vo">
<option value="{$vo.id}">{$vo.name}</option>
</foreach>
</select>
适用阶段:
... ... @@ -87,15 +87,7 @@
</td>
<td>{$vo['id']}</td>
<td>{$vo['name']}</td>
<td>
<if condition="$vo['ser_type'] eq 0">
简历服务
<elseif condition="$vo['ser_type'] eq 1">
职业规划
<elseif condition="$vo['ser_type'] eq 2">
面试辅导
</if>
</td>
<td>{$vo['tname']}</td>
<td>{$vo['price_ori']}</td>
<td>{$vo['price_new']}</td>
<td>{$vo['describes']}</td>
... ...
... ... @@ -63,6 +63,7 @@
<th width="50">ID</th>
<th>标题</th>
<th>分类</th>
<th>作者</th>
<th width="130">更新时间</th>
<th width="130">发布时间</th>
<th width="70">状态</th>
... ... @@ -93,6 +94,7 @@
</span>&nbsp;
</foreach>
</td>
<td>{$vo.user_login}</td>
<td width="20%">
<notempty name="vo.update_time">
{:date('Y-m-d H:i',$vo['update_time'])}
... ...
... ... @@ -50,11 +50,10 @@
<td>{$vo.balance}</td>
<td>{$user_statuses[$vo['user_status']]}</td>
<td>
<a class="js-ajax-delete" href="{:url('adminIndex/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
<if condition="$vo['user_status'] eq 1">
<a href="{:url('adminIndex/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
<a href="{:url('adminIndex/ban',array('id'=>$vo['id'],'mobile'=>$vo['mobile']))}" class="js-ajax-dialog-btn" data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
<else />
<a href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
<a href="{:url('adminIndex/cancelban',array('id'=>$vo['id'],'mobile'=>$vo['mobile']))}" class="js-ajax-dialog-btn" data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
</if>
</td>
</tr>
... ...