作者 sgj
1 个管道 的构建 失败 耗费 4 秒

后台信息完善

<?php
/**
* Created by PhpStorm.
* auther: sgj
* Date: 2020/10/14
* Time: 20:13
*/
namespace app\admin\controller;
use cmf\controller\AdminBaseController;
class ClockController extends AdminBaseController
{
/**
* @return mixed
*/
public function index(){
$param=$this->request->param();
$map=[];
$data= db('clock')->alias('c')
->field('v.name as user_name,v.photo,c.*')
->join('user u','u.id=c.user_id')
->join('volunteer v','v.user_id=c.user_id')
->where($map)
->order('c.id desc')
->paginate();
$data->appends($param);
$list=$data->items();
$this->assign([
'data'=>$list,
'page'=>$data->render(),
]);
return $this->fetch();
}
public function info(){
$param=$this->request->param();
$map=[];
}
/**
* 编辑信息
* @return mixed
*/
public function edit(){
$id = input('id');
$param = $this->request->param();
$map['c.id'] = $id;
$data = db('clock')->alias('c')
->field('v.name as user_name,v.photo,c.*')
->join('user u','u.id=c.user_id')
->join('volunteer v','v.user_id=c.user_id')
->where($map)
->find();
$this->assign('data', $data);
return $this->fetch();
}
/**
* 添加信息
* @return mixed
*/
public function add(){
return $this->fetch();
}
}
\ No newline at end of file
... ...
... ... @@ -4,6 +4,7 @@ return array (
'ADMIN_ACTIVITY_ACTIVITYTYPE' => '活动类型管理',
'ADMIN_ACTIVITY_INDEX' => '活动列表',
'ADMIN_ACTIVITY_NEWS' => '活动新闻',
'ADMIN_CLOCK_INDEX' => '活动打卡管理',
'ADMIN_CONTACT_INDEX' => '联系我们',
'ADMIN_GOOD_INDEX' => '商品列表',
'ADMIN_HOOK_INDEX' => '钩子管理',
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header"/>
</head>
<body>
<!--<script type="text/html" id="photos-item-tpl">-->
<!--<li id="saved-image{id}">-->
<!--<input id="photo-{id}" type="hidden" name="photo_urls[]" value="{filepath}">-->
<!--<input class="form-control" id="photo-{id}-name" type="text" name="photo_names[]" value="{name}"-->
<!--style="width: 200px;" title="图片名称">-->
<!--<img id="photo-{id}-preview" src="{url}" style="height:36px;width: 36px;"-->
<!--onclick="imagePreviewDialog(this.src);">-->
<!--<a href="javascript:uploadOneImage('图片上传','#photo-{id}');">替换</a>-->
<!--<a href="javascript:(function(){$('#saved-image{id}').remove();})();">移除</a>-->
<!--</li>-->
<!--</script>-->
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li><a href="{:url('index')}">打卡列表</a></li>
<li>
<a href="{:url('add')}">打卡添加</a>
</li>
<li class="active"><a href="#">编辑打卡</a></li>
</ul>
<form action="{:url('editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
<div class="row">
<div class="col-md-9">
<table class="table table-bordered">
<tr>
<th width="100">名称(限20字)<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="good_name"
id="title" value="{$data.activity_name}" placeholder="请输入名称"/>
<input type="hidden" name="id" value="{$data.id}">
</td>
</tr>
<tr>
<th width="100">活动日期<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="date"
type="time" id="title" value="{$data.date}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">经度<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="long"
type="text" id="title" value="{$data.long}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">纬度<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="lat"
type="text" id="title" value="{$data.lat}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">开始打卡时间<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="start_clock_time"
type="time" id="title" value="{$data.start_clock_time}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">结束打卡时间<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="end_clock_time"
type="time" value="{$data.end_clock_time}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">用户开始打卡时间<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="user_start"
type="time" id="title" value="{$data.user_start}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">用户结束打卡时间<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="user_end"
type="time" value="{$data.user_end}" placeholder="请输入"/>
</td>
</tr>
<tr>
<th width="100">用户打卡状态<span class="form-required">*</span></th>
<td>
<label><input type="radio" value="0" <eq name="$data.status" value="0">checked</eq> >未打卡</label>
<label><input type="radio" value="1" <eq name="$data.status" value="1">checked</eq> >已打卡</label>
<label><input type="radio" value="2" <eq name="$data.status" value="2">checked</eq> >完成打卡</label>
<label><input type="radio" value="3" <eq name="$data.status" value="2">checked</eq> >未完成</label>
</td>
</tr>
</table>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
</div>
</div>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
//编辑器路径定义
var editorURL = GV.WEB_ROOT;
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
$(function () {
editorcontent = new baidu.editor.ui.Editor();
editorcontent.render('content');
try {
editorcontent.sync();
} catch (err) {
}
$('.btn-cancel-thumbnail').click(function () {
$('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail').val('');
});
$('.btn-cancel-thumbnail1').click(function () {
$('#thumbnail-preview1').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
$('#thumbnail1').val('');
});
});
</script>
</body>
</html>
... ...
<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:url('index')}">打卡列表</a></li>
<li>
<a href="{:url('add')}">打卡添加</a>
</li>
</ul>
<!-- <form class="well form-inline margin-top-20" method="post" action="{:url('activity/index')}">
关键字:
<input type="text" class="form-control" name="keyword" style="width: 150px;" value="{$keyword|default=''}" placeholder="请输入关键字">
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('activity/index')}">清空</a>
</form>-->
<form class="js-ajax-form" action="" method="post">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="20">id</th>
<th width="50">活动名称</th>
<th width="50">用户信息</th>
<th width="50">状态</th>
<th width="50">日期</th>
<th width="50">地点</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<foreach name="data" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.activity_name}</td>
<td>{$vo.user_name}</td>
<if condition="$vo.status==0"> <td>未打卡</td> </if>
<if condition="$vo.status==1"> <td>已开始</td> </if>
<if condition="$vo.status==2"> <td>完成打卡</td> </if>
<if condition="$vo.status==3"> <td>未完成</td> </if>
<td>{$vo.date}</td>
<td>{$vo.address}</td>
<td>
<a href='{:url("edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<include file="public@header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:url('index')}">订单列表</a></li>
</ul>
<!-- <form class="well form-inline margin-top-20" method="post" action="{:url('activity/index')}">
关键字:
<input type="text" class="form-control" name="keyword" style="width: 150px;" value="{$keyword|default=''}" placeholder="请输入关键字">
<input type="submit" class="btn btn-primary" value="搜索" />
<a class="btn btn-danger" href="{:url('activity/index')}">清空</a>
</form>-->
<form class="js-ajax-form" action="" method="post">
<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 width="20">订单id</th>
<th width="50">订单编号</th>
<th width="50">商品信息</th>
<th width="50">状态</th>
<th width="50">下单时间</th>
<th width="50">用户信息</th>
<th width="50">商品数量</th>
<th width="100">操作</th>
</tr>
</thead>
<tbody>
<foreach name="data" 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.id}</td>
<td>{$vo.order_sn}</td>
<td>{$vo.good_name}</td>
<if condition="$vo.status==0"> <td>待审核</td> </if>
<if condition="$vo.status==1"> <td>已发放</td> </if>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>{$vo.user_name}</td>
<td>{$vo.num}</td>
<td>
<a href='{:url("edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
<!--<a class="js-ajax-delete" href="{:url('delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>-->
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -46,17 +46,9 @@
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>{$vo.user_name}</td>
<td>{$vo.num}</td>
<!--<td>-->
<!--<notempty name="$vo.pic">-->
<!--<a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.pic)}');">-->
<!--<img height="80px" src="{:cmf_get_image_preview_url($vo.pic)}">-->
<!--</a>-->
<!--</notempty>-->
<!--</td>-->
<td>
<a href='{:url("edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
<!--<a class="js-ajax-delete" href="{:url('delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>-->
</td>
</tr>
</foreach>
... ...