mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-03-19 04:04:08 +00:00
删除无用文件
This commit is contained in:
parent
710141739b
commit
09e4d23ce9
File diff suppressed because one or more lines are too long
@ -1,396 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\controller\ump;
|
||||
|
||||
use app\admin\controller\AuthController;
|
||||
use service\FormBuilder as Form;
|
||||
use traits\CurdControllerTrait;
|
||||
use service\UtilService as Util;
|
||||
use service\JsonService as Json;
|
||||
use service\UploadService as Upload;
|
||||
use think\Request;
|
||||
use app\admin\model\store\StoreProduct as ProductModel;
|
||||
use app\admin\model\ump\StoreCombinationAttr;
|
||||
use app\admin\model\ump\StoreCombinationAttrResult;
|
||||
use app\admin\model\ump\StoreCombination as StoreCombinationModel;
|
||||
use think\Url;
|
||||
use app\admin\model\system\SystemAttachment;
|
||||
use app\admin\model\ump\StorePink;
|
||||
|
||||
/**
|
||||
* 拼团管理
|
||||
* Class StoreCombination
|
||||
* @package app\admin\controller\store
|
||||
*/
|
||||
class StoreCombination extends AuthController
|
||||
{
|
||||
|
||||
use CurdControllerTrait;
|
||||
|
||||
protected $bindModel = StoreCombinationModel::class;
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$this->assign('countCombination',StoreCombinationModel::getCombinationCount());
|
||||
$this->assign(StoreCombinationModel::getStatistics());
|
||||
$this->assign('combinationId',StoreCombinationModel::getCombinationIdAll());
|
||||
return $this->fetch();
|
||||
}
|
||||
public function save_excel(){
|
||||
$where = Util::getMore([
|
||||
['is_show',''],
|
||||
['store_name',''],
|
||||
]);
|
||||
StoreCombinationModel::SaveExcel($where);
|
||||
}
|
||||
/**
|
||||
* 异步获取拼团数据
|
||||
*/
|
||||
public function get_combination_list(Request $request){
|
||||
$where=Util::getMore([
|
||||
['page',1],
|
||||
['limit',20],
|
||||
['export',0],
|
||||
['is_show',''],
|
||||
['is_host',''],
|
||||
['store_name','']
|
||||
],$request);
|
||||
$combinationList = StoreCombinationModel::systemPage($where);
|
||||
if(is_object($combinationList['list'])) $combinationList['list'] = $combinationList['list']->toArray();
|
||||
$data = $combinationList['list']['data'];
|
||||
foreach ($data as $k=>$v){
|
||||
$data[$k]['_stop_time'] = date('Y/m/d H:i:s',$v['stop_time']);
|
||||
}
|
||||
return Json::successlayui(['count'=>$combinationList['list']['total'],'data'=>$data]);
|
||||
}
|
||||
|
||||
public function combination($id = 0){
|
||||
if(!$id) return $this->failed('数据不存在');
|
||||
$product = ProductModel::get($id);
|
||||
if(!$product) return Json::fail('数据不存在!');
|
||||
$f = array();
|
||||
$f[] = Form::hidden('product_id',$id);
|
||||
// $f[] = Form::select('product_id','产品名称')->setOptions(function(){
|
||||
// $list = ProductModel::getTierList();
|
||||
// foreach ($list as $menu){
|
||||
// $menus[] = ['value'=>$menu['id'],'label'=>$menu['store_name'].'/'.$menu['id']];
|
||||
// }
|
||||
// return $menus;
|
||||
// })->filterable(1);
|
||||
$f[] = Form::input('title','拼团名称',$product->getData('store_name'));
|
||||
$f[] = Form::input('info','拼团简介',$product->getData('store_info'))->type('textarea');
|
||||
$f[] = Form::input('unit_name','单位',$product->getData('unit_name'))->placeholder('个、位');
|
||||
$f[] = Form::dateTimeRange('section_time','拼团时间');
|
||||
$f[] = Form::frameImageOne('image','产品主图片(305*305px)',Url::build('admin/widget.images/index',array('fodder'=>'image')),$product->getData('image'))->icon('image');
|
||||
$f[] = Form::frameImages('images','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'images')),json_decode($product->getData('slider_image')))->maxLength(5)->icon('images');
|
||||
$f[] = Form::number('price','拼团价')->min(0)->col(12);
|
||||
$f[] = Form::number('people','拼团人数')->min(3)->col(12);
|
||||
$f[] = Form::number('stock','库存',$product->getData('stock'))->min(0)->precision(0)->col(12);
|
||||
$f[] = Form::number('sales','销量',$product->getData('sales'))->min(0)->precision(0)->col(12);
|
||||
$f[] = Form::number('sort','排序')->col(12);
|
||||
$f[] = Form::number('postage','邮费',$product->getData('postage'))->min(0)->col(12);
|
||||
$f[] = Form::radio('is_postage','是否包邮',$product->getData('is_postage'))->options([['label'=>'是','value'=>1],['label'=>'否','value'=>0]])->col(12);
|
||||
$f[] = Form::radio('is_host','热门推荐',1)->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]])->col(12);
|
||||
$f[] = Form::radio('is_show','活动状态',1)->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]])->col(12);
|
||||
$form = Form::make_post_form('添加用户通知',$f,Url::build('save'));
|
||||
$this->assign(compact('form'));
|
||||
return $this->fetch('public/form-builder');
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示创建资源表单页.
|
||||
*
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
$f = array();
|
||||
$f[] = Form::select('product_id','产品名称')->setOptions(function(){
|
||||
$list = ProductModel::getTierList();
|
||||
foreach ($list as $menu){
|
||||
$menus[] = ['value'=>$menu['id'],'label'=>$menu['store_name'].'/'.$menu['id']];
|
||||
}
|
||||
return $menus;
|
||||
})->filterable(1);
|
||||
$f[] = Form::input('title','拼团名称');
|
||||
$f[] = Form::input('info','拼团简介')->type('textarea');
|
||||
$f[] = Form::input('unit_name','单位')->placeholder('个、位');
|
||||
$f[] = Form::dateTimeRange('section_time','拼团时间');
|
||||
$f[] = Form::frameImageOne('image','产品主图片(305*305px)',Url::build('admin/widget.images/index',array('fodder'=>'image')))->icon('image');
|
||||
$f[] = Form::frameImages('images','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'images')))->maxLength(5)->icon('images');
|
||||
$f[] = Form::number('price','拼团价')->min(0)->col(12);
|
||||
$f[] = Form::number('people','拼团人数')->min(3)->col(12);
|
||||
$f[] = Form::number('stock','库存')->min(0)->precision(0)->col(12);
|
||||
$f[] = Form::number('sales','销量')->min(0)->precision(0)->col(12);
|
||||
$f[] = Form::number('sort','排序')->col(12);
|
||||
$f[] = Form::number('postage','邮费')->min(0)->col(12);
|
||||
$f[] = Form::radio('is_postage','是否包邮',1)->options([['label'=>'是','value'=>1],['label'=>'否','value'=>0]])->col(12);
|
||||
$f[] = Form::radio('is_host','热门推荐',1)->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]])->col(12);
|
||||
$f[] = Form::radio('is_show','活动状态',1)->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]])->col(12);
|
||||
$form = Form::make_post_form('添加用户通知',$f,Url::build('save'));
|
||||
$this->assign(compact('form'));
|
||||
return $this->fetch('public/form-builder');
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新建的资源
|
||||
*
|
||||
* @param \think\Request $request
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function save(Request $request,$id=0)
|
||||
{
|
||||
$data = Util::postMore([
|
||||
'product_id',
|
||||
'title',
|
||||
'info',
|
||||
['image',''],
|
||||
['images',[]],
|
||||
['section_time',[]],
|
||||
'postage',
|
||||
'price',
|
||||
'people',
|
||||
'sort',
|
||||
'stock',
|
||||
'sales',
|
||||
['is_show',0],
|
||||
['is_host',0],
|
||||
['is_postage',0],
|
||||
],$request);
|
||||
if(!$data['title']) return Json::fail('请输入拼团名称');
|
||||
if(!$data['info']) return Json::fail('请输入拼团简介');
|
||||
if(!$data['image']) return Json::fail('请上传产品图片');
|
||||
if(count($data['images'])<1) return Json::fail('请上传产品轮播图');
|
||||
if($data['price'] == '' || $data['price'] < 0) return Json::fail('请输入产品售价');
|
||||
if($data['people'] == '' || $data['people'] < 1) return Json::fail('请输入拼团人数');
|
||||
if(count($data['section_time'])<1) return Json::fail('请选择活动时间');
|
||||
if($data['stock'] == '' || $data['stock'] < 0) return Json::fail('请输入库存');
|
||||
$data['images'] = json_encode($data['images']);
|
||||
$data['add_time'] = time();
|
||||
$data['start_time'] = strtotime($data['section_time'][0]);
|
||||
$data['stop_time'] = strtotime($data['section_time'][1]);
|
||||
$data['description'] = '';
|
||||
unset($data['section_time']);
|
||||
if($id){
|
||||
$product = StoreCombinationModel::get($id);
|
||||
if(!$product) return Json::fail('数据不存在!');
|
||||
$data['product_id']=$product['product_id'];
|
||||
StoreCombinationModel::edit($data,$id);
|
||||
return Json::successful('编辑成功!');
|
||||
}else{
|
||||
StoreCombinationModel::set($data);
|
||||
return Json::successful('添加拼团成功!');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示编辑资源表单页.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
if(!$id) return $this->failed('数据不存在');
|
||||
$product = StoreCombinationModel::get($id);
|
||||
if(!$product) return Json::fail('数据不存在!');
|
||||
$f = array();
|
||||
$f[] = Form::input('title','拼团名称',$product->getData('title'));
|
||||
$f[] = Form::input('info','拼团简介',$product->getData('title'))->type('textarea');
|
||||
$f[] = Form::input('unit_name','单位',$product->getData('title'))->placeholder('个、位');
|
||||
$f[] = Form::dateTimeRange('section_time','拼团时间',$product->getData('start_time'),$product->getData('stop_time'));
|
||||
$f[] = Form::frameImageOne('image','产品主图片(305*305px)',Url::build('admin/widget.images/index',array('fodder'=>'image')),$product->getData('image'))->icon('image');
|
||||
$f[] = Form::frameImages('images','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'images')),json_decode($product->getData('images')))->maxLength(5)->icon('images');
|
||||
$f[] = Form::number('price','拼团价',$product->getData('price'))->min(0)->col(12);
|
||||
$f[] = Form::number('people','拼团人数',$product->getData('people'))->min(2)->col(12);
|
||||
$f[] = Form::number('stock','库存',$product->getData('stock'))->min(0)->precision(0)->col(12);
|
||||
$f[] = Form::number('sales','销量',$product->getData('sales'))->min(0)->precision(0)->col(12);
|
||||
$f[] = Form::number('sort','排序',$product->getData('sort'))->col(12);
|
||||
$f[] = Form::number('postage','邮费',$product->getData('postage'))->min(0)->col(12);
|
||||
$f[] = Form::radio('is_postage','是否包邮',$product->getData('is_postage'))->options([['label'=>'是','value'=>1],['label'=>'否','value'=>0]])->col(12);
|
||||
$f[] = Form::radio('is_host','热门推荐',$product->getData('is_host'))->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]])->col(12);
|
||||
$f[] = Form::radio('is_show','活动状态',$product->getData('is_show'))->options([['label'=>'开启','value'=>1],['label'=>'关闭','value'=>0]])->col(12);
|
||||
$form = Form::make_post_form('添加用户通知',$f,Url::build('save',compact('id')));
|
||||
$this->assign(compact('form'));
|
||||
return $this->fetch('public/form-builder');
|
||||
// $this->assign([
|
||||
// 'title'=>'编辑产品','rules'=>$this->read($id)->getContent(),
|
||||
// 'action'=>Url::build('update',array('id'=>$id))
|
||||
// ]);
|
||||
// return $this->fetch('public/common_form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定资源
|
||||
*
|
||||
* @param int $id
|
||||
* @return \think\Response
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
if(!$id) return $this->failed('数据不存在');
|
||||
$data['is_del'] = 1;
|
||||
if(!StoreCombinationModel::edit($data,$id))
|
||||
return Json::fail(StoreCombinationModel::getErrorInfo('删除失败,请稍候再试!'));
|
||||
else
|
||||
return Json::successful('删除成功!');
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性页面
|
||||
* @param $id
|
||||
* @return mixed|void
|
||||
*/
|
||||
public function attr($id)
|
||||
{
|
||||
if(!$id) return $this->failed('数据不存在!');
|
||||
$result = StoreCombinationAttrResult::getResult($id);
|
||||
$image = StoreCombinationModel::where('id',$id)->value('image');
|
||||
$this->assign(compact('id','result','product','image'));
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成属性
|
||||
* @param int $id
|
||||
*/
|
||||
public function is_format_attr($id = 0){
|
||||
if(!$id) return Json::fail('产品不存在');
|
||||
list($attr,$detail) = Util::postMore([
|
||||
['items',[]],
|
||||
['attrs',[]]
|
||||
],$this->request,true);
|
||||
$product = StoreCombinationModel::get($id);
|
||||
if(!$product) return Json::fail('产品不存在');
|
||||
$attrFormat = attrFormat($attr)[1];
|
||||
if(count($detail)){
|
||||
foreach ($attrFormat as $k=>$v){
|
||||
foreach ($detail as $kk=>$vv){
|
||||
if($v['detail'] == $vv['detail']){
|
||||
$attrFormat[$k]['price'] = $vv['price'];
|
||||
$attrFormat[$k]['sales'] = $vv['sales'];
|
||||
$attrFormat[$k]['pic'] = $vv['pic'];
|
||||
$attrFormat[$k]['check'] = false;
|
||||
break;
|
||||
}else{
|
||||
$attrFormat[$k]['price'] = '';
|
||||
$attrFormat[$k]['sales'] = '';
|
||||
$attrFormat[$k]['pic'] = $product['image'];
|
||||
$attrFormat[$k]['check'] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
foreach ($attrFormat as $k=>$v){
|
||||
$attrFormat[$k]['price'] = $product['price'];
|
||||
$attrFormat[$k]['sales'] = $product['stock'];
|
||||
$attrFormat[$k]['pic'] = $product['image'];
|
||||
$attrFormat[$k]['check'] = false;
|
||||
}
|
||||
}
|
||||
return Json::successful($attrFormat);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加 修改属性
|
||||
* @param $id
|
||||
*/
|
||||
public function set_attr($id)
|
||||
{
|
||||
if(!$id) return $this->failed('产品不存在!');
|
||||
list($attr,$detail) = Util::postMore([
|
||||
['items',[]],
|
||||
['attrs',[]]
|
||||
],$this->request,true);
|
||||
$res = StoreCombinationAttr::createProductAttr($attr,$detail,$id);
|
||||
if($res)
|
||||
return $this->successful('编辑属性成功!');
|
||||
else
|
||||
return $this->failed(StoreCombinationAttr::getErrorInfo());
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除属性
|
||||
* @param $id
|
||||
*/
|
||||
public function clear_attr($id)
|
||||
{
|
||||
if(!$id) return $this->failed('产品不存在!');
|
||||
if(false !== StoreCombinationAttr::clearProductAttr($id) && false !== StoreCombinationAttrResult::clearResult($id))
|
||||
return $this->successful('清空产品属性成功!');
|
||||
else
|
||||
return $this->failed(StoreCombinationAttr::getErrorInfo('清空产品属性失败!'));
|
||||
}
|
||||
|
||||
public function edit_content($id){
|
||||
if(!$id) return $this->failed('数据不存在');
|
||||
$product = StoreCombinationModel::get($id);
|
||||
if(!$product) return Json::fail('数据不存在!');
|
||||
$this->assign([
|
||||
'content'=>StoreCombinationModel::where('id',$id)->value('description'),
|
||||
'field'=>'description',
|
||||
'action'=>Url::build('change_field',['id'=>$id,'field'=>'description'])
|
||||
]);
|
||||
return $this->fetch('public/edit_content');
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
$res = Upload::image('file','store/product/'.date('Ymd'));
|
||||
$thumbPath = Upload::thumb($res->dir);
|
||||
//产品图片上传记录
|
||||
$fileInfo = $res->fileInfo->getinfo();
|
||||
SystemAttachment::attachmentAdd($res->fileInfo->getSaveName(),$fileInfo['size'],$fileInfo['type'],$res->dir,$thumbPath,2);
|
||||
if($res->status == 200)
|
||||
return Json::successful('图片上传成功!',['name'=>$res->fileInfo->getSaveName(),'url'=>Upload::pathToUrl($thumbPath)]);
|
||||
else
|
||||
return Json::fail($res->error);
|
||||
}
|
||||
|
||||
/**拼团列表
|
||||
* @return mixed
|
||||
*/
|
||||
public function combina_list()
|
||||
{
|
||||
$where = Util::getMore([
|
||||
['status',''],
|
||||
['data',''],
|
||||
],$this->request);
|
||||
$this->assign('where',$where);
|
||||
$this->assign(StorePink::systemPage($where));
|
||||
|
||||
return $this->fetch();
|
||||
}
|
||||
/**拼团人列表
|
||||
* @return mixed
|
||||
*/
|
||||
public function order_pink($id){
|
||||
if(!$id) return $this->failed('数据不存在');
|
||||
$StorePink = StorePink::getPinkUserOne($id);
|
||||
if(!$StorePink) return $this->failed('数据不存在!');
|
||||
$list = StorePink::getPinkMember($id);
|
||||
$list[] = $StorePink;
|
||||
$this->assign('list',$list);
|
||||
return $this->fetch();
|
||||
}/**
|
||||
* 修改拼团状态
|
||||
* @param $status
|
||||
* @param int $idd
|
||||
*/
|
||||
public function set_combination_status($status,$id = 0){
|
||||
if(!$id) return Json::fail('参数错误');
|
||||
$res = StoreCombinationModel::edit(['is_show'=>$status],$id);
|
||||
if($res) return Json::successful('修改成功');
|
||||
else return Json::fail('修改失败');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,236 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<link href="{__FRAME_PATH}css/plugins/footable/footable.core.css" rel="stylesheet">
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
<script src="{__PLUG_PATH}echarts.common.min.js"></script>
|
||||
<script src="{__FRAME_PATH}js/plugins/footable/footable.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline" id="form">
|
||||
<div class="search-item" data-name="data">
|
||||
<span>创建时间:</span>
|
||||
<button style="height: 26px;line-height: 12px;font-size: 12px;" type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.today}">今天</button>
|
||||
<button style="height: 26px;line-height: 12px;font-size: 12px;" type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.week}">本周</button>
|
||||
<button style="height: 26px;line-height: 12px;font-size: 12px;" type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.month}">本月</button>
|
||||
<button style="height: 26px;line-height: 12px;font-size: 12px;" type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.quarter}">本季度</button>
|
||||
<button style="height: 26px;line-height: 12px;font-size: 12px;" type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.year}">本年</button>
|
||||
<div class="datepicker" style="display: inline-block;">
|
||||
<button style="height: 26px;line-height: 12px;font-size: 12px;" type="button" class="btn btn-outline btn-link" data-value="{$where.data?:'no'}">自定义</button>
|
||||
</div>
|
||||
<input class="search-item-value" type="hidden" name="data" value="{$where.data}" />
|
||||
</div>
|
||||
<div class="search-item" data-name="status">
|
||||
<span>砍价状态:</span>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="">全部</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="1">开启</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="0">关闭</button>
|
||||
<input class="search-item-value" type="hidden" name="status" value="{$where.status}" />
|
||||
</div>
|
||||
|
||||
<div class="input-group" style="float: right;">
|
||||
<span class="input-group-btn">
|
||||
<input type="hidden" name="export" value="0">
|
||||
<input type="text" name="store_name" value="{$where.store_name}" placeholder="请输入产品名称,关键字,编号" class="input-sm form-control" size="38">
|
||||
<button type="submit" id="no_export" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i> 搜索</button>
|
||||
<button type="submit" id="export" class="btn btn-sm btn-info btn-outline"> <i class="fa fa-exchange" ></i> Excel导出</button></span>
|
||||
<script>
|
||||
$('#export').on('click',function(){
|
||||
$('input[name=export]').val(1);
|
||||
});
|
||||
$('#no_export').on('click',function(){
|
||||
$('input[name=export]').val(0);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" style="margin-top: 20px;">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">砍价活动名称</th>
|
||||
<th class="text-center">砍价产品名称</th>
|
||||
<th class="text-center">砍价图片</th>
|
||||
<th class="text-center">砍价价格</th>
|
||||
<th class="text-center">砍价状态</th>
|
||||
<th class="text-center">活动状态</th>
|
||||
<th class="text-center">库存</th>
|
||||
<th class="text-center">排序</th>
|
||||
<th class="text-center">内容</th>
|
||||
<th class="text-center" width="5%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.store_name}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$vo.image}" alt="{$vo.store_name}" class="open_image" data-image="{$vo.image}" style="width: 50px;height: 50px;cursor: pointer;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.status' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.start_name}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stock}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.sort}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('edit_content',array('id'=>$vo['id']))}')"><i class="fa fa-pencil"></i> 编辑内容</button>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="input-group-btn js-group-btn" style="min-width: 106px;">
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{$vo.store_name}-编辑','{:Url('edit',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-paste"></i> 编辑
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" id="delstor" data-url="{:Url('delete',array('id'=>$vo['id']))}">
|
||||
<i class="fa fa-warning"></i> 删除
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.search-item>li').on('click', function () {
|
||||
var that = $(this), value = that.data('value'), p = that.parent(), name = p.data('name'), form = $('#form');
|
||||
form.find('input[name="' + name + '"]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
form.submit();
|
||||
});
|
||||
$('.search-item>.btn').on('click',function(){
|
||||
var that = $(this),value = that.data('value'),p = that.parent(),name = p.data('name'),form = p.parents();
|
||||
form.find('input[name="'+name+'"]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
form.submit();
|
||||
});
|
||||
$('.search-item-value').each(function(){
|
||||
var that = $(this),name = that.attr('name'), value = that.val(),dom = $('.search-item[data-name="'+name+'"] .btn[data-value="'+value+'"]');
|
||||
dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
|
||||
.siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
|
||||
});
|
||||
$('.search-is>.btn').on('click',function(){
|
||||
var that = $(this),value = that.data('value'),p = that.parent(),name = p.data('name'),form = p.parents();
|
||||
var valueAdmin = form.find('input[name="'+name+'"]').val();
|
||||
if(valueAdmin) value = '';
|
||||
else value = 1;
|
||||
form.find('input[name="'+name+'"]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
form.submit();
|
||||
});
|
||||
$('.js-group-btn').on('click',function(){
|
||||
$('.js-group-btn').css({zIndex:1});
|
||||
$(this).css({zIndex:2});
|
||||
});
|
||||
$('.search-is-value').each(function(){
|
||||
var that = $(this),name = that.attr('name'), value = that.val(),dom = $('.search-is[data-name="'+name+'"] .btn[data-value="'+value+'"]');
|
||||
dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
|
||||
.siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
|
||||
});
|
||||
$('#delstor').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
});
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '取消',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
//$("input[name=limit_time]").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("input[name=data]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
$('input[name=export]').val(0);
|
||||
$('form').submit();
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,371 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
{include file="public/head"}
|
||||
<title>{$title|default=''}</title>
|
||||
<style>
|
||||
.demo-upload{
|
||||
display: block;
|
||||
height: 33px;
|
||||
text-align: center;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
margin-right: 4px;
|
||||
}
|
||||
.demo-upload img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-cover{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0,0,0,.6);
|
||||
}
|
||||
.demo-upload:hover .demo-upload-cover{
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-cover i{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
margin: 0 2px;
|
||||
}
|
||||
.check{color: #f00}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="store-attr" class="mp-form" v-cloak="">
|
||||
<i-Form :label-width="80" style="width: 100%" v-show="hidden == false">
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<i-Col span="5">
|
||||
<i-Button type="dashed" long @click="hiddenBool" icon="plus-round">添加新规则</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</i-Form>
|
||||
<i-Form :label-width="80" style="width: 100%" v-show="hidden == true">
|
||||
<Form-Item
|
||||
:label="'规则名称:'">
|
||||
<Row>
|
||||
<i-Col style="position: relative;margin-right: 6px" span="5"
|
||||
v-for="(item, index) in items"
|
||||
:key="index">
|
||||
<i-Input type="text" v-model="item.value" placeholder="设置名称"></i-Input>
|
||||
<i-Button style="position: absolute;top:0;right:0;margin-top:1px;border: none;font-size: 8px;line-height: 1.8" type="ghost" @click="handleRemove(index)" v-show="item.attrHidden == true"><Icon type="close-round" /></i-Button>
|
||||
<i-Button style="position: absolute;top:0;right:0;margin-top:1px;border: none;font-size: 8px;line-height: 1.8" type="ghost" @click="attrHiddenBool(item)" v-show="item.attrHidden == false"><Icon type="checkmark-round"></Icon></i-Button>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Button type="dashed" long @click="handleAdd" icon="plus-round">添加新规则</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
<Form-Item v-show="item.attrHidden == true"
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:label="''+item.value+':'" >
|
||||
<Row>
|
||||
<i-Col span="3"
|
||||
v-for="(attr,k) in item.detail"
|
||||
:key="attr"
|
||||
:name="attr">
|
||||
<Tag type="border" closable color="blue" @on-close="attrRemove(item,k)">{{ attr }}</Tag>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Input type="text" v-model="item.detailValue" placeholder="设置属性"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Button type="primary" style="margin-left: 6px" @click="attrAdd(item)">添加</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
<Form-Item v-show="hidden == true" style="width: 100%;">
|
||||
<Row style="margin: 0 88px 0 20px">
|
||||
<i-Col span="24">
|
||||
<i-Button type="primary" long @click="addGoods(true)">生成</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
|
||||
<template v-if="items[0].value!='' && items[0].detail.length>0 && attrs.length">
|
||||
<template v-for="(attr,index) in attrs">
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<template v-for="(item,index) in attr.detail">
|
||||
<i-Col span="3" style="margin-right: 3px">
|
||||
{{index}}:{{item}}
|
||||
</i-Col>
|
||||
</template>
|
||||
<i-Col span="5" style="margin-right: 3px">
|
||||
<span :class="attr.check ? 'check':''">金额:</span><i-Input placeholder="请输入金额" v-model="attr.price" style="width: 68%"
|
||||
:number="true"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="5" style="margin-right: 3px">
|
||||
<span :class="attr.check ? 'check':''">库存:</span><i-Input placeholder="请输入库存" v-model="attr.sales" style="width: 68%"
|
||||
:number="true"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="2" offset="1" style="margin-right: 3px">
|
||||
<div class="demo-upload">
|
||||
<img :src="attr.pic">
|
||||
<div class="demo-upload-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="openPic(attr.pic)" ></Icon>
|
||||
<Upload
|
||||
:show-upload-list="false"
|
||||
:on-success="uploadSuccess(attr)"
|
||||
:on-error="uploadError"
|
||||
:format="['jpg','jpeg','png']"
|
||||
:max-size="2048"
|
||||
accept="image/*"
|
||||
:on-format-error="uploadFormatError"
|
||||
action="{:Url('upload')}"
|
||||
style="display: inline-block"
|
||||
:goods="attr"
|
||||
>
|
||||
<Icon type="ios-cloud-upload-outline"></Icon>
|
||||
</Upload>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</i-Col>
|
||||
<i-Col span="2" style="margin-right: 3px">
|
||||
<i-Button type="ghost" @click="removeGoods(index)">删除</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</template>
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<!-- <i-Col span="10">-->
|
||||
<!-- <i-Button type="dashed" long @click="addGoods" icon="plus-round">添加新商品</i-Button>-->
|
||||
<!-- </i-Col>-->
|
||||
<i-Col span="2" offset="2">
|
||||
<i-Button type="primary" @click="submit">提交</i-Button>
|
||||
</i-Col>
|
||||
<i-Col span="2" offset="1">
|
||||
<i-Button type="error" @click="clear">清空所有属性</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</template>
|
||||
</i-Form>
|
||||
<Spin fix v-show="submiting == true">保存中...</Spin>
|
||||
</div>
|
||||
<script>
|
||||
var _vm ;
|
||||
mpFrame.start(function(Vue){
|
||||
new Vue({
|
||||
data () {
|
||||
return {
|
||||
hidden:false,
|
||||
submiting :false,
|
||||
items: <?php echo $result && isset($result['attr']) && !empty($result['attr']) ? json_encode($result['attr']) : 'false'; ?> || [
|
||||
{
|
||||
value: '',
|
||||
detailValue:'',
|
||||
attrHidden:false,
|
||||
detail:[]
|
||||
}
|
||||
],
|
||||
attrs:<?php echo $result && isset($result['value']) && !empty($result['value']) ? json_encode($result['value']) : '[]'; ?>
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
items:{
|
||||
handler:function(){
|
||||
// this.attrs = [];
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
attrHiddenBool(item){
|
||||
if(item.value == ''){
|
||||
$eb.message('error','请填写规则名称');
|
||||
}else{
|
||||
item.attrHidden = true;
|
||||
}
|
||||
},
|
||||
hiddenBool(){
|
||||
this.hidden = true;
|
||||
},
|
||||
handleAdd () {
|
||||
if(!this.checkAttr())return ;
|
||||
this.items.push({
|
||||
value: '',
|
||||
detailValue:'',
|
||||
attrHidden:false,
|
||||
detail:[]
|
||||
});
|
||||
},
|
||||
checkAttr(){
|
||||
var bool = true;
|
||||
this.items.map(function(item){
|
||||
if(!bool) return;
|
||||
if(!item.value){
|
||||
$eb.message('error','请填写规则名称');
|
||||
bool = false;
|
||||
}else if(!item.detail.length){
|
||||
$eb.message('error','请设置规则属性');
|
||||
bool = false;
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
},
|
||||
attrAdd (item) {
|
||||
if(!item.detailValue) return false;
|
||||
item.detail.push(item.detailValue);
|
||||
item.detailValue = '';
|
||||
},
|
||||
handleRemove (index) {
|
||||
if(this.items.length > 1)
|
||||
this.items.splice(index,1);
|
||||
else
|
||||
$eb.message('error','请设置至少一个规则');
|
||||
},
|
||||
attrRemove(item,k){
|
||||
if(1==item.detail.length){
|
||||
$eb.message('error','请设置至少一个属性');
|
||||
return false;
|
||||
}
|
||||
item.detail.splice(k,1);
|
||||
},
|
||||
removeGoods(index){
|
||||
this.attrs.splice(index,1);
|
||||
},
|
||||
checkGoods(){
|
||||
var bool = true;
|
||||
this.attrs.map(function(attr){
|
||||
if(!bool) return ;
|
||||
if(!Object.keys(attr.detail).length){
|
||||
$eb.message('error','请选择至少一个属性');
|
||||
bool = false;
|
||||
}else if(attr.price != parseFloat(attr.price) || attr.price < 0){
|
||||
$eb.message('error','请输入正确的商品价格');
|
||||
bool = false;
|
||||
}else if(attr.sales != parseInt(attr.sales) || attr.sales < 0){
|
||||
$eb.message('error','请输入正确的商品库存');
|
||||
bool = false;
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
},
|
||||
addGoods(type){
|
||||
var that = this;
|
||||
if(this.attrs.length){
|
||||
if(!this.checkGoods())return ;
|
||||
}
|
||||
$eb.axios.post("{:Url('is_format_attr',array('id'=>$id))}",{items:this.items,attrs:this.attrs}).then(function(res){
|
||||
if(res.data.code == 200){
|
||||
that.attrs = res.data.data
|
||||
}else{
|
||||
$eb.message('error',res.data.msg);
|
||||
}
|
||||
}).catch(function(err){
|
||||
if(res.data.code == 200){
|
||||
that.attrs = res.data.data
|
||||
}else{
|
||||
$eb.message('error',res.data.msg);
|
||||
}
|
||||
})
|
||||
// if(type === true){
|
||||
// this.attrs = [{
|
||||
// detail:{},
|
||||
// price:'',
|
||||
// sales:'',
|
||||
// pic:'{$image}'
|
||||
// }];
|
||||
// }else{
|
||||
// this.attrs.push({
|
||||
// detail:{},
|
||||
// price:'',
|
||||
// sales:'',
|
||||
// pic:'{$image}'
|
||||
// });
|
||||
// }
|
||||
},
|
||||
openPic(src){
|
||||
$eb.openImage(src);
|
||||
},
|
||||
uploadSuccess(data){
|
||||
return function(response, file, fileList){
|
||||
if(response.code == 200){
|
||||
data.pic = response.data.url;
|
||||
}else{
|
||||
$eb.message('error',response.data.msg || '图片上传失败!');
|
||||
}
|
||||
}
|
||||
},
|
||||
uploadError(error, file, fileList){
|
||||
$eb.message('error',error);
|
||||
},
|
||||
uploadFormatError(file, fileList){
|
||||
$eb.message('error','图片格式错误');
|
||||
},
|
||||
submit(){
|
||||
var that = this;
|
||||
that.submiting = true;
|
||||
if(!this.checkAttr() || !this.checkGoods()) return ;
|
||||
for(let attr in that.attrs){
|
||||
that.attrs[attr].check = false;
|
||||
}
|
||||
$eb.axios.post("{:Url('set_attr',array('id'=>$id))}",{items:this.items,attrs:this.attrs}).then(function(res){
|
||||
that.submiting = false;
|
||||
if(res.status == 200 && res.data.code == 200){
|
||||
$eb.message('success',res.data.msg || '编辑成功!');
|
||||
$eb.closeModalFrame(window.name);
|
||||
}else{
|
||||
$eb.message('error',res.data.msg || '请求失败!');
|
||||
}
|
||||
}).catch(function(err){
|
||||
$eb.message('error',err);
|
||||
})
|
||||
},
|
||||
clear(){
|
||||
var that = this;
|
||||
requirejs(['sweetalert'], function (swel) {
|
||||
swel({
|
||||
title: "您确定要清空产品属性吗",
|
||||
text: "删除后将无法恢复,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "是的,我要清空!",
|
||||
cancelButtonText: "让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function () {
|
||||
$eb.axios.post("{:Url('clear_attr',array('id'=>$id))}", {
|
||||
items: that.items,
|
||||
attrs: that.attrs
|
||||
}).then(function (res) {
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
$eb.message('success', res.data.msg || '清空成功!');
|
||||
window.location.reload();
|
||||
} else {
|
||||
$eb.message('error', res.data.msg || '清空失败!');
|
||||
}
|
||||
}).catch(function (err) {
|
||||
$eb.message('error', err);
|
||||
})
|
||||
}).catch(console.log);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted (){
|
||||
_vm = this;
|
||||
var resultAdmin = <?php echo $result && isset($result['attr']) && !empty($result['attr']) ? json_encode($result['attr']) : 'false'; ?>;
|
||||
if(resultAdmin) this.hidden = true;
|
||||
}
|
||||
}).$mount(document.getElementById('store-attr'));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
@ -1,159 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">添加拼团</button>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline">
|
||||
<select name="is_show" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">产品状态</option>
|
||||
<option value="1" {eq name="where.is_show" value="1"}selected="selected"{/eq}>上架</option>
|
||||
<option value="0" {eq name="where.is_show" value="0"}selected="selected"{/eq}>下架</option>
|
||||
</select>
|
||||
<select name="is_host" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">推荐状态</option>
|
||||
<option value="1" {eq name="where.is_host" value="1"}selected="selected"{/eq}>是</option>
|
||||
<option value="0" {eq name="where.is_host" value="0"}selected="selected"{/eq}>否</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" name="store_name" value="{$where.store_name}" placeholder="请输入产品名称,编号" class="input-sm form-control" size="38"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">拼团名称</th>
|
||||
<th class="text-center">产品名称</th>
|
||||
<th class="text-center">拼团图片</th>
|
||||
<th class="text-center">开始时间</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">拼团人数</th>
|
||||
<th class="text-center">价格</th>
|
||||
<th class="text-center">产品状态</th>
|
||||
<th class="text-center">推荐状态</th>
|
||||
<th class="text-center">库存</th>
|
||||
<th class="text-center">排序</th>
|
||||
<th class="text-center">内容</th>
|
||||
<th class="text-center" width="10%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.store_name}/{$vo.product_id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$vo.image}" alt="{$vo.store_name}" class="open_image" data-image="{$vo.image}" style="width: 50px;height: 50px;cursor: pointer;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.start_time|date="Y-m-d H:i:s",###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stop_time|date="Y-m-d H:i:s",###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.people}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_show' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_host' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stock}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.sort}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('edit_content',array('id'=>$vo['id']))}')"><i class="fa fa-pencil"></i> 编辑内容</button>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="input-group-btn js-group-btn">
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{$vo.store_name}-属性','{:Url('attr',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-shekel"></i> 属性
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('编辑','{:Url('edit',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-paste"></i> 编辑
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" id="delstor" data-url="{:Url('delete',array('id'=>$vo['id']))}">
|
||||
<i class="fa fa-warning"></i> 删除
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.js-group-btn').on('click',function(){
|
||||
$('.js-group-btn').css({zIndex:1});
|
||||
$(this).css({zIndex:2});
|
||||
});
|
||||
$('#delstor').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,90 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__FRAME_PATH}js/content.min.js"></script>
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 m-b-xs">
|
||||
<form action="" class="form-inline">
|
||||
<i class="fa fa-search" style="margin-right: 10px;"></i>
|
||||
<div class="input-group" style="width: 80%">
|
||||
<input type="text" name="title" value="{$where.title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券有效期限</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_time}天
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-primary btn-xs grant" data-url="{:Url('store.storeCouponUser/grant',array('id'=>$vo['id'],'uid'=>$uid))}" type="button"><i class="fa fa-arrow-circle-o-right"></i> 发放
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.grant').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
swal({
|
||||
title: "您确定要发放优惠券给‘{$nickname}’吗?",
|
||||
text:"发放后将无法撤回,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText:"是的,我要发放!",
|
||||
cancelButtonText:"让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
swal(res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '发放失败')
|
||||
}).catch(function(err){
|
||||
swal(err);
|
||||
});
|
||||
}).catch(console.log);
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,90 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__FRAME_PATH}js/content.min.js"></script>
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 m-b-xs">
|
||||
<form action="" class="form-inline">
|
||||
<i class="fa fa-search" style="margin-right: 10px;"></i>
|
||||
<div class="input-group" style="width: 80%">
|
||||
<input type="text" name="title" value="{$where.title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券有效期限</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_time}天
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-primary btn-xs grant" data-url="{:Url('store.storeCouponUser/grant_all',array('id'=>$vo['id']))}" type="button"><i class="fa fa-arrow-circle-o-right"></i> 发放
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.grant').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
swal({
|
||||
title: "您确定要发放优惠券吗?",
|
||||
text:"发放后将无法撤回,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText:"是的,我要发放!",
|
||||
cancelButtonText:"让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
swal(res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '发放失败')
|
||||
}).catch(function(err){
|
||||
swal(err);
|
||||
});
|
||||
}).catch(console.log);
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,115 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__FRAME_PATH}js/content.min.js"></script>
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 m-b-xs">
|
||||
<form action="" class="form-inline">
|
||||
<i class="fa fa-search" style="margin-right: 10px;"></i>
|
||||
<div class="input-group" style="width: 80%">
|
||||
<input type="text" name="title" value="{$where.title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券有效期限</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_time}天
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-primary btn-xs grant" data-id="{$vo['id']}" data-url="{:Url('store.storeCouponUser/grant_group',array('id'=>$vo['id']))}" type="button"><i class="fa fa-arrow-circle-o-right"></i> 发放
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
var group = {$group};
|
||||
$('.grant').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
var option = {};
|
||||
$.each(group,function (item,index) {
|
||||
option[index.id] = index.name;
|
||||
})
|
||||
var inputOptions = new Promise(function(resolve) {
|
||||
resolve(option);
|
||||
});
|
||||
swal({
|
||||
title: '请选择要给哪个组发放',
|
||||
input: 'radio',
|
||||
inputOptions: inputOptions,
|
||||
inputValidator: function(result) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
if (result) {
|
||||
resolve();
|
||||
} else {
|
||||
reject('请选择要给哪个组发放优惠卷');
|
||||
}
|
||||
});
|
||||
}
|
||||
}).then(function(result) {
|
||||
if (result) {
|
||||
swal({
|
||||
title: "您确定要发放优惠券吗?",
|
||||
text:"发放后将无法撤回,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText:"是的,我要发放!",
|
||||
cancelButtonText:"让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function(){
|
||||
$eb.axios.post(url,{group:result}).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
swal(res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '发放失败')
|
||||
}).catch(function(err){
|
||||
swal(err);
|
||||
});
|
||||
}).catch(console.log);
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,90 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__FRAME_PATH}js/content.min.js"></script>
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 m-b-xs">
|
||||
<form action="" class="form-inline">
|
||||
<i class="fa fa-search" style="margin-right: 10px;"></i>
|
||||
<div class="input-group" style="width: 80%">
|
||||
<input type="text" name="title" value="{$where.title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券有效期限</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_time}天
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-primary btn-xs grant" data-url="{:Url('store.storeCouponUser/grant_subscribe',array('id'=>$vo['id']))}" type="button"><i class="fa fa-arrow-circle-o-right"></i> 发放
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.grant').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
swal({
|
||||
title: "您确定要发放优惠券吗?",
|
||||
text:"发放后将无法撤回,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText:"是的,我要发放!",
|
||||
cancelButtonText:"让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
swal(res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '发放失败')
|
||||
}).catch(function(err){
|
||||
swal(err);
|
||||
});
|
||||
}).catch(console.log);
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,115 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__FRAME_PATH}js/content.min.js"></script>
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 m-b-xs">
|
||||
<form action="" class="form-inline">
|
||||
<i class="fa fa-search" style="margin-right: 10px;"></i>
|
||||
<div class="input-group" style="width: 80%">
|
||||
<input type="text" name="title" value="{$where.title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券有效期限</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_time}天
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-primary btn-xs grant" data-url="{:Url('store.storeCouponUser/grant_tag',array('id'=>$vo['id']))}" type="button"><i class="fa fa-arrow-circle-o-right"></i> 发放
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
var tag = {$tag};
|
||||
$('.grant').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
var option = {};
|
||||
$.each(tag,function (item,index) {
|
||||
option[index.id] = index.name;
|
||||
})
|
||||
var inputOptions = new Promise(function(resolve) {
|
||||
resolve(option);
|
||||
});
|
||||
swal({
|
||||
title: '请选择要给哪个标签发放',
|
||||
input: 'radio',
|
||||
inputOptions: inputOptions,
|
||||
inputValidator: function(result) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
if (result) {
|
||||
resolve();
|
||||
} else {
|
||||
reject('请选择要给哪个标签发放优惠卷');
|
||||
}
|
||||
});
|
||||
}
|
||||
}).then(function(result) {
|
||||
if (result) {
|
||||
swal({
|
||||
title: "您确定要发放优惠券吗?",
|
||||
text:"发放后将无法撤回,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText:"是的,我要发放!",
|
||||
cancelButtonText:"让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function(){
|
||||
$eb.axios.post(url,{tag:result}).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
swal(res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '发放失败')
|
||||
}).catch(function(err){
|
||||
swal(err);
|
||||
});
|
||||
}).catch(console.log);
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,157 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">添加优惠券</button>
|
||||
<div class="ibox-tools">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline">
|
||||
|
||||
<select name="status" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">是否有效</option>
|
||||
<option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>开启</option>
|
||||
<option value="0" {eq name="where.status" value="0"}selected="selected"{/eq}>关闭</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" name="title" value="{$where.title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券有效期限</th>
|
||||
<th class="text-center">排序</th>
|
||||
<th class="text-center">是否有效</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th class="text-center" width="10%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_time}天
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.sort}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.status' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="input-group-btn js-group-btn">
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{if condition="$vo['status']"}
|
||||
<li>
|
||||
<a href="javascript:void(0);" id="del" data-url="{:Url('status',array('id'=>$vo['id']))}">
|
||||
<i class="fa fa-yelp"></i> 立即失效
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame(this.innerText+' [{$vo.title}] 优惠劵','{:Url('issue',['id'=>$vo['id']])}')">
|
||||
<i class="fa fa-male"></i> 发布
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" id="delstor" data-url="{:Url('delete',array('id'=>$vo['id']))}">
|
||||
<i class="fa fa-warning"></i> 删除
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.js-group-btn').on('click',function(){
|
||||
$('.js-group-btn').css({zIndex:1});
|
||||
$(this).css({zIndex:100});
|
||||
});
|
||||
$('#del').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
// _this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '修改失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改优惠券的状态吗?','text':'修改后将无法恢复并且已发出的优惠券将失效,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
});
|
||||
$('#delstor').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要删除优惠券吗?','text':'删除后将无法恢复,请谨慎操作!','confirm':'是的,我要删除'})
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,107 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
|
||||
<form action="" class="form-inline">
|
||||
<select name="status" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">状态</option>
|
||||
<option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>正常</option>
|
||||
<option value="0" {eq name="where.status" value="0"}selected="selected"{/eq}>未开启</option>
|
||||
<option value="2" {eq name="where.status" value="2"}selected="selected"{/eq}>已过期</option>
|
||||
<option value="2" {eq name="where.status" value="2"}selected="selected"{/eq}>已失效</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" name="coupon_title" value="{$where.coupon_title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">领取日期</th>
|
||||
<th class="text-center">发布数量</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{empty name="$vo.start_time"}
|
||||
不限时
|
||||
{else/}
|
||||
{$vo.start_time|date="Y/m/d H:i",###} - {$vo.end_time|date="Y/m/d H:i",###}
|
||||
{/empty}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{empty name="$vo.total_count"}
|
||||
不限量
|
||||
{else/}
|
||||
<b style="color: #0a6aa1">发布:{$vo.total_count}</b>
|
||||
<br/>
|
||||
<b style="color:#ff0000;">剩余:{$vo.remain_count}</b>
|
||||
{/empty}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<?php if(!$vo['status']){ ?>
|
||||
<span class="label label-warning">未开启</span>
|
||||
<?php }elseif(-1 == $vo['status']){ ?>
|
||||
<span class="label label-danger">已失效</span>
|
||||
<?php }elseif(1 == $vo['status']){ ?>
|
||||
<span class="label label-primary">正常</span>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('修改状态','{:Url('issue_log',array('id'=>$vo['id']))}')"><i class="fa fa-commenting-o"></i> 领取记录</button>
|
||||
{neq name="vo.status" value="-1"}
|
||||
<button class="btn btn-primary btn-xs" type="button" onclick="$eb.createModalFrame('修改状态','{:Url('edit',array('id'=>$vo['id']))}',{w:300,h:170})"><i class="fa fa-paste"></i> 修改状态</button>
|
||||
{/neq}
|
||||
<button class="btn btn-danger btn-xs" data-url="{:Url('delete',array('id'=>$vo['id']))}" type="button"><i class="fa fa-warning"></i> 删除
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.btn-danger').on('click',function(){
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要删除发布的优惠券吗?','text':'删除后将无法恢复,请谨慎操作!','confirm':'是的,我要删除'})
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,40 +0,0 @@
|
||||
{include file="public/frame_head"}
|
||||
<style type="text/css" media="screen">
|
||||
td img{width: 35px; height: 35px;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">用户名</th>
|
||||
<th class="text-center">用户头像</th>
|
||||
<th class="text-center">领取时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">{$vo.nickname}</td>
|
||||
<td class="text-center"><img src="{$vo.avatar}" class="head_image" data-image="{$vo.avatar}" width="35" height="35"></td>
|
||||
<td class="text-center">{$vo.add_time}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('td img').on('click',function (e) {
|
||||
var image = $(this).attr("src");
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
{include file="public/inner_footer"}
|
||||
@ -1,104 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
|
||||
<form action="" class="form-inline">
|
||||
|
||||
<select name="is_fail" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">是否有效</option>
|
||||
<option value="1" {eq name="where.is_fail" value="1"}selected="selected"{/eq}>是</option>
|
||||
<option value="0" {eq name="where.is_fail" value="0"}selected="selected"{/eq}>否</option>
|
||||
</select>
|
||||
<select name="status" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">状态</option>
|
||||
<option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>已使用</option>
|
||||
<option value="0" {eq name="where.status" value="0"}selected="selected"{/eq}>未使用</option>
|
||||
<option value="2" {eq name="where.status" value="2"}selected="selected"{/eq}>已过期</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" name="nickname" value="{$where.nickname}" placeholder="请输入发放人姓名" class="input-sm form-control"> <span class="input-group-btn">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" name="coupon_title" value="{$where.coupon_title}" placeholder="请输入优惠券名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">优惠券名称</th>
|
||||
<th class="text-center">发放人</th>
|
||||
<th class="text-center">优惠券面值</th>
|
||||
<th class="text-center">优惠券最低消费</th>
|
||||
<th class="text-center">优惠券开始使用时间</th>
|
||||
<th class="text-center">优惠券结束使用时间</th>
|
||||
<th class="text-center">获取放方式</th>
|
||||
<th class="text-center">是否可用</th>
|
||||
<th class="text-center">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.nickname}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.coupon_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.use_min_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.end_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.type == 'send' ? '后台发放' : '手动领取'}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['status'] eq 0" && $vo['is_fail'] eq 0}
|
||||
<i class="fa fa-check text-navy"></i>
|
||||
{else/}
|
||||
<i class="fa fa-close text-danger"></i>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['status'] eq 2"}
|
||||
已过期
|
||||
{elseif condition="$vo['status'] eq 1"/}
|
||||
已使用
|
||||
{else/}
|
||||
未使用
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@ -1,57 +0,0 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
|
||||
<meta name="browsermode" content="application"/>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<!-- 禁止百度转码 -->
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<!-- uc强制竖屏 -->
|
||||
<meta name="screen-orientation" content="portrait">
|
||||
<!-- QQ强制竖屏 -->
|
||||
<meta name="x5-orientation" content="portrait">
|
||||
<title>物流信息</title>
|
||||
<link rel="stylesheet" type="text/css" href="/public/static/css/reset.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{__WAP_PATH}crmeb/font/iconfont.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="{__WAP_PATH}crmeb/css/style.css?2"/>
|
||||
<script type="text/javascript" src="/public/static/js/media.js"></script>
|
||||
<script type="text/javascript" src="/public/static/plug/jquery-1.10.2.min.js"></script>
|
||||
<script type="text/javascript" src="{__WAP_PATH}crmeb/js/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="user-order-logistics" style="overflow: hidden;">
|
||||
<section>
|
||||
<div class="product-info flex">
|
||||
<div class="picture"><img src="{__WAP_PATH}crmeb/images/express_icon.jpg"/></div>
|
||||
<div class="logistics-tip flex">
|
||||
<div class="company">物流公司:{$order.delivery_name}</div>
|
||||
<div class="number">物流单号:{$order.delivery_id}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logistics-info" style="background-color: inherit;">
|
||||
<?php if(!$express || $express['status'] != 0){ ?>
|
||||
<div class="empty">
|
||||
<img src="{__WAP_PATH}crmeb/images/empty_address.png">
|
||||
<p>暂无查询记录</p>
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
<ul class="flex">
|
||||
{volist name="express.result.list" id="vo"}
|
||||
<li class="clearfix">
|
||||
<div class="right-wrapper fl">
|
||||
<p>{$vo.status}</p>
|
||||
<span>{$vo.time}</span>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,609 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<link href="{__FRAME_PATH}css/plugins/footable/footable.core.css" rel="stylesheet">
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
<script src="{__PLUG_PATH}echarts.common.min.js"></script>
|
||||
<script src="{__FRAME_PATH}js/plugins/footable/footable.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline search-form">
|
||||
<div class="search-item" data-name="status">
|
||||
<span class="btn-outline btn-link btn-sm">订单状态:</span>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="">全部</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="0">未支付</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="1">未发货</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="2">待收货</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="3">待评价</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="4">交易完成</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="-1">退款中</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="-2">已退款</button>
|
||||
<input class="search-item-value" type="hidden" name="status" value="{$where.status}" />
|
||||
</div>
|
||||
<div class="search-item" data-name="combination_id">
|
||||
<span class="btn-outline btn-link btn-sm">订单类型:</span>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="">全部</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="普通订单">普通订单</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="拼团订单">拼团订单</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="秒杀订单">秒杀订单</button>
|
||||
<input class="search-item-value" type="hidden" name="combination_id" value="{$where.combination_id}" />
|
||||
</div>
|
||||
<div class="search-item" data-name="data">
|
||||
<span class="btn-outline btn-link btn-sm">创建时间:</span>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$limitTimeList.yesterday}">昨天</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$limitTimeList.today}">今天</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$limitTimeList.week}">本周</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$limitTimeList.month}">本月</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$limitTimeList.quarter}">本季度</button>
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$limitTimeList.year}">本年</button>
|
||||
<div class="datepicker" style="display: inline-block;">
|
||||
<button type="button" class="btn btn-sm btn-info btn-outline btn-link" data-value="{$where.data?:'no'}">自定义</button>
|
||||
</div>
|
||||
<input class="search-item-value" type="hidden" name="data" value="{$where.data}" />
|
||||
</div>
|
||||
<div class="col-sm-4 text-right col-sm-offset-8" style="padding-bottom: 10px;">
|
||||
<div class="input-group">
|
||||
<input size="26" type="text" name="real_name" value="{$where.real_name}" placeholder="请输入姓名、电话、订单编号" class="input-sm form-control">
|
||||
<input type="hidden" name="export" value="0">
|
||||
<input type="hidden" name="order" id="order">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" id="no_export" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i> 搜索</button>
|
||||
<button type="submit" id="export" class="btn btn-sm btn-info btn-outline"> <i class="fa fa-exchange" ></i> Excel导出</button>
|
||||
<script>
|
||||
$('#export').on('click',function(){
|
||||
$('input[name=export]').val(1);
|
||||
});
|
||||
$('#no_export').on('click',function(){
|
||||
$('input[name=export]').val(0);
|
||||
});
|
||||
</script>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive ibox-content" style="padding-right: 0;padding-left: 0;overflow:visible">
|
||||
<div class="row">
|
||||
<?php $list_num = $list->toArray(); ?>
|
||||
<div class="col-sm-12 m-b-sm">
|
||||
<span class="m-xs">售出商品:<strong class="text-danger">{$price.total_num}</strong></span>
|
||||
<span class="m-xs">订单数量:<strong class="text-danger">{$list_num.total}</strong></span>
|
||||
<span class="m-xs">订单金额:<strong class="text-danger">¥{$price.pay_price}</strong></span>
|
||||
<span class="m-xs">退款金额:<strong class="text-danger m-sm">¥{$price.refund_price}</strong></span>
|
||||
{if condition="$price['pay_price_wx'] GT 0"}
|
||||
<span class="m-xs">微信支付金额:<strong class="text-danger">¥{$price.pay_price_wx}</strong></span>
|
||||
{/if}
|
||||
{if condition="$price['pay_price_yue'] GT 0"}
|
||||
<span class="m-xs">余额支付金额:<strong class="text-danger">¥{$price.pay_price_yue}</strong></span>
|
||||
{/if}
|
||||
{if condition="$price['pay_price_offline'] GT 0"}
|
||||
<span class="m-xs">线下支付金额:<strong class="text-danger">¥{$price.pay_price_offline}</strong></span>
|
||||
{/if}
|
||||
{if condition="$price['pay_price_other'] GT 0"}
|
||||
<span class="m-xs">线下支付金额:<strong class="text-danger">¥{$price.pay_price_other}</strong></span>
|
||||
{/if}
|
||||
{if condition="$price['use_integral'] GT 0"}
|
||||
<span class="m-xs">积分抵扣:<strong class="text-success">{$price.use_integral} (抵扣金额:¥{$price.deduction_price})</strong></span>
|
||||
{/if}
|
||||
{if condition="$price['back_integral'] GT 0"}
|
||||
<span class="m-xs">退回积分:<strong class="text-success">{$price.back_integral}</strong></span>
|
||||
{/if}
|
||||
</div>
|
||||
<!--<div class="col-sm-8 text-left m-b-sm">
|
||||
|
||||
</div>-->
|
||||
</div>
|
||||
<table class="footable table table-striped table-bordered " data-page-size="20">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center" width="13%">订单号</th>
|
||||
<th class="text-center" width="10%">用户信息</th>
|
||||
<th class="text-center" width="42%">商品信息</th>
|
||||
<th class="text-center" width="8%">
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-white btn-xs dropdown-toggle" style="font-weight: bold;background-color: #f5f5f6;border: solid 0;" aria-expanded="false">
|
||||
实际支付
|
||||
<span class="second caret"></span>
|
||||
</button>
|
||||
<!-- <span class="caret" data-toggle="dropdown" class="dropdown-toggle" aria-expanded="false"></span>-->
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="ordersoft" data-value="">
|
||||
<i class="fa fa-arrows-v"></i> 默认排序
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="ordersoft" data-value="pay_price asc">
|
||||
<i class="fa fa-sort-numeric-asc"></i> 升序
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="ordersoft" data-value="pay_price desc">
|
||||
<i class="fa fa-sort-numeric-desc"></i> 降序
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<th class="text-center" width="5%">支付状态</th>
|
||||
<th class="text-center" width="8%">订单状态</th>
|
||||
<th class="text-center" width="5%">详情</th>
|
||||
<th class="text-center" width="10%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.order_id} <br/>
|
||||
<span style="color: {$vo.color};">{$vo.pink_name}</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p><span>{$vo.nickname} / {$vo.uid}</span></p>
|
||||
</td>
|
||||
<td>
|
||||
<?php $info_order = $vo['_info'];?>
|
||||
{volist name="info_order" id="info"}
|
||||
{if condition="isset($info['cart_info']['productInfo']['attrInfo']) && !empty($info['cart_info']['productInfo']['attrInfo'])"}
|
||||
<p>
|
||||
<span><img class="open_image" data-image="{$info.cart_info.productInfo.image}" style="width: 30px;height: 30px;cursor: pointer;" src="{$info.cart_info.productInfo.attrInfo.image}" alt="{$info.cart_info.productInfo.store_name}" title="{$info.cart_info.productInfo.store_name}"></span>
|
||||
<span>{$info.cart_info.productInfo.store_name} {$info.cart_info.productInfo.attrInfo.suk}</span><span> | ¥{$info.cart_info.truePrice}×{$info.cart_info.cart_num}</span>
|
||||
</p>
|
||||
{else/}
|
||||
<p>
|
||||
<span><img class="open_image" data-image="{$info.cart_info.productInfo.image}" style="width: 30px;height: 30px;cursor: pointer;" src="{$info.cart_info.productInfo.image}" alt="{$info.cart_info.productInfo.store_name}" title="{$info.cart_info.productInfo.store_name}"></span>
|
||||
<span>{$info.cart_info.productInfo.store_name}</span><span> | ¥{$info.cart_info.truePrice}×{$info.cart_info.cart_num}</span>
|
||||
</p>
|
||||
{/if}
|
||||
{/volist}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
¥{$vo.pay_price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['paid'] eq 1"}
|
||||
<p><span>
|
||||
{if condition="$vo['pay_type'] eq 'weixin'"}
|
||||
微信支付
|
||||
{elseif condition="$vo['pay_type'] eq 'yue'"}
|
||||
余额支付
|
||||
{elseif condition="$vo['pay_type'] eq 'offline'"}
|
||||
线下支付
|
||||
{else/}
|
||||
其他支付
|
||||
{/if}
|
||||
</span></p>
|
||||
{else/}
|
||||
{if condition="$vo['pay_type'] eq 'offline'"}
|
||||
<p><span>线下支付</span></p>
|
||||
<p><button data-pay="{$vo.pay_price}" data-url="{:Url('offline',array('id'=>$vo['id']))}" type="button" class="offline_btn btn btn-w-m btn-white">立即支付</button></p>
|
||||
|
||||
{else/}
|
||||
<p><span>未支付</span></p>
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['paid'] eq 0 && $vo['status'] eq 0"}
|
||||
未支付
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 0 && $vo['refund_status'] eq 0"/}
|
||||
未发货
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 1 && $vo['refund_status'] eq 0"/}
|
||||
待收货
|
||||
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 2 && $vo['refund_status'] eq 0"/}
|
||||
待评价
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 3 && $vo['refund_status'] eq 0"/}
|
||||
交易完成
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['refund_status'] eq 1"/}
|
||||
<b style="color:#f124c7">申请退款</b><br/>
|
||||
<span>退款原因:{$vo.refund_reason_wap}</span>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['refund_status'] eq 2"/}
|
||||
已退款
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-white btn-bitbucket btn-xs" onclick="$eb.createModalFrame('{$vo.nickname}-订单详情','{:Url('order_info',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-file-text"></i> 订单详情
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span class="input-group-btn js-group-btn" style="min-width: 106px;">
|
||||
{if condition="$vo['paid'] eq 0 && $vo['status'] eq 0 && $vo['refund_status'] eq 0"}<!--未支付-->
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('修改订单','{:Url('edit',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-file-text"></i> 修改订单
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 0 && $vo['refund_status'] eq 0"/}<!--已支付-->
|
||||
|
||||
<button class="btn btn-primary btn-xs" type="button" onclick="$eb.createModalFrame('去发货','{:Url('deliver_goods',array('id'=>$vo['id']))}',{w:400,h:300})"><i class="fa fa-cart-plus"></i> 去发货</button>
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('去送货','{:Url('delivery',array('id'=>$vo['id']))}',{w:400,h:300})">
|
||||
<i class="fa fa-motorcycle"></i> 去送货
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
{if condition="$vo['pay_price'] neq $vo['refund_price']"}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y',array('id'=>$vo['id']))}',{w:400,h:300})">
|
||||
<i class="fa fa-history"></i> 立即退款
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if condition="$vo['use_integral'] GT 0 && $vo['use_integral'] EGT $vo['back_integral']"}<!-- 退积分 -->
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退积分','{:Url('integral_back',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 退积分
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['refund_status'] eq 1"/}<!--已支付 退款中-->
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{if condition="$vo['use_integral'] GT 0 && $vo['use_integral'] EGT $vo['back_integral']"}<!-- 退积分 -->
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退积分','{:Url('integral_back',array('id'=>$vo['id']))}',{w:400,h:300})">
|
||||
<i class="fa fa-history"></i> 退积分
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if condition="$vo['pay_price'] neq $vo['refund_price']"}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y',array('id'=>$vo['id']))}',{w:400,h:300})">
|
||||
<i class="fa fa-history"></i>立即退款
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('不退款','{:Url('refund_n',array('id'=>$vo['id']))}',{w:400,h:300})">
|
||||
<i class="fa fa-openid"></i> 不退款
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 1 && $vo['refund_status'] eq 0"/}<!--已支付 已发货 待收货-->
|
||||
<button class="btn btn-default btn-xs" type="button" onclick="$eb.createModalFrame('配送信息','{:Url('distribution',array('id'=>$vo['id']))}')"><i class="fa fa-cart-arrow-down"></i> 配送信息</button>
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="danger-btn" href="javascript:void(0);" data-url="{:Url('take_delivery',array('id'=>$vo['id']))}">
|
||||
<i class="fa fa-cart-arrow-down"></i> 已收货
|
||||
</a>
|
||||
</li>
|
||||
{if condition="$vo['pay_price'] neq $vo['refund_price']"}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 立即退款
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if condition="$vo['use_integral'] GT 0 && $vo['use_integral'] EGT $vo['back_integral']"}<!-- 退积分 -->
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退积分','{:Url('integral_back',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 退积分
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 2 && $vo['refund_status'] eq 0"/}<!--已支付 已收货 待评价-->
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
{if condition="$vo['pay_price'] neq $vo['refund_price']"}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 立即退款
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if condition="$vo['use_integral'] GT 0 && $vo['use_integral'] EGT $vo['back_integral']"}<!-- 退积分 -->
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退积分','{:Url('integral_back',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 退积分
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['status'] eq 3 && $vo['refund_status'] eq 0"/} <!--订单完成 -->
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
{if condition="$vo['pay_price'] neq $vo['refund_price']"}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退款','{:Url('refund_y',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 立即退款
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{if condition="$vo['use_integral'] GT 0 && $vo['use_integral'] EGT $vo['back_integral']"}<!-- 退积分 -->
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退积分','{:Url('integral_back',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 退积分
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{elseif condition="$vo['paid'] eq 1 && $vo['refund_status'] eq 2"/}<!-- 已支付 已退款-->
|
||||
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a class="save_mark" href="javascript:void(0);" data-id="{$vo['id']}" data-make="{$vo.remark}" data-url="{:Url('remark')}">
|
||||
<i class="fa fa-paste"></i> 订单备注
|
||||
</a>
|
||||
</li>
|
||||
{if condition="$vo['use_integral'] GT 0 && $vo['use_integral'] EGT $vo['back_integral']"}<!-- 退积分 -->
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('退积分','{:Url('integral_back',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-history"></i> 退积分
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('订单记录','{:Url('order_status',array('oid'=>$vo['id']))}')">
|
||||
<i class="fa fa-newspaper-o"></i> 订单记录
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{__FRAME_PATH}js/content.min.js?v=1.0.0"></script>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
|
||||
|
||||
$(function init(){
|
||||
$('.search-item>.btn').on('click',function(){
|
||||
var that = $(this),value = that.data('value'),p = that.parent(),name = p.data('name'),form = p.parents();
|
||||
form.find('input[name="'+name+'"]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
form.submit();
|
||||
});
|
||||
$('.search-item-value').each(function(){
|
||||
var that = $(this),name = that.attr('name'), value = that.val(),dom = $('.search-item[data-name="'+name+'"] .btn[data-value="'+value+'"]');
|
||||
dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary').siblings().addClass('btn-outline btn-link btn-sm').removeClass('btn-primary')
|
||||
});
|
||||
});
|
||||
$('.ordersoft').on('click',function(){
|
||||
var that = $(this),value = that.data('value');
|
||||
$('input[name=order]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
$('form').submit();
|
||||
});
|
||||
$('.js-group-btn').on('click',function(){
|
||||
$('.js-group-btn').css({zIndex:1});
|
||||
$(this).css({zIndex:2});
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
});
|
||||
$('.danger-btn,.btn-danger').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改收货状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
$('.offline_btn').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url'),pay_price =_this.data('pay');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改已支付'+pay_price+'元的状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
|
||||
$('.add_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id');
|
||||
$eb.$alert('textarea',{},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
$('.save_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id'),make=_this.data('make');
|
||||
$eb.$alert('textarea',{title:'请修改内容',value:make},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '取消',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
//$("input[name=limit_time]").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("input[name=data]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
$('input[name=export]').val(0);
|
||||
$('form').submit();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,138 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="ibox-content order-info">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
收货信息
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6" >用户昵称: {$userInfo.nickname}</div>
|
||||
<div class="col-xs-6">收货人: {$orderInfo.real_name}</div>
|
||||
<div class="col-xs-6">联系电话: {$orderInfo.user_phone}</div>
|
||||
<div class="col-xs-6">收货地址: {$orderInfo.user_address}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
订单信息
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6" >订单编号: {$orderInfo.order_id}</div>
|
||||
<div class="col-xs-6" style="color: #8BC34A;">订单状态:
|
||||
{if condition="$orderInfo['paid'] eq 0 && $orderInfo['status'] eq 0"}
|
||||
未支付
|
||||
{elseif condition="$orderInfo['paid'] eq 1 && $orderInfo['status'] eq 0 && $orderInfo['refund_status'] eq 0"/}
|
||||
未发货
|
||||
{elseif condition="$orderInfo['paid'] eq 1 && $orderInfo['status'] eq 1 && $orderInfo['refund_status'] eq 0"/}
|
||||
待收货
|
||||
{elseif condition="$orderInfo['paid'] eq 1 && $orderInfo['status'] eq 2 && $orderInfo['refund_status'] eq 0"/}
|
||||
待评价
|
||||
{elseif condition="$orderInfo['paid'] eq 1 && $orderInfo['status'] eq 3 && $orderInfo['refund_status'] eq 0"/}
|
||||
交易完成
|
||||
{elseif condition="$orderInfo['paid'] eq 1 && $orderInfo['refund_status'] eq 1"/}
|
||||
申请退款<b style="color:#f124c7">{$orderInfo.refund_reason_wap}</b>
|
||||
{elseif condition="$orderInfo['paid'] eq 1 && $orderInfo['refund_status'] eq 2"/}
|
||||
已退款
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-xs-6">商品总数: {$orderInfo.total_num}</div>
|
||||
<div class="col-xs-6">商品总价: ¥{$orderInfo.total_price}</div>
|
||||
<div class="col-xs-6">支付邮费: ¥{$orderInfo.total_postage}</div>
|
||||
<div class="col-xs-6">实际支付: ¥{$orderInfo.pay_price}</div>
|
||||
{if condition="$orderInfo['refund_price'] GT 0"}
|
||||
<div class="col-xs-6" style="color: #f1a417">退款金额: ¥{$orderInfo.refund_price}</div>
|
||||
{/if}
|
||||
{if condition="$orderInfo['deduction_price'] GT 0"}
|
||||
<div class="col-xs-6" style="color: #f1a417">使用积分: {$orderInfo.use_integral}积分(抵扣了¥{$orderInfo.deduction_price})</div>
|
||||
{/if}
|
||||
{if condition="$orderInfo['back_integral'] GT 0"}
|
||||
<div class="col-xs-6" style="color: #f1a417">退回积分: ¥{$orderInfo.back_integral}</div>
|
||||
{/if}
|
||||
<div class="col-xs-6">创建时间: {$orderInfo.add_time|date="Y/m/d H:i",###}</div>
|
||||
<div class="col-xs-6">支付方式:
|
||||
{if condition="$orderInfo['paid'] eq 1"}
|
||||
{if condition="$orderInfo['pay_type'] eq 'weixin'"}
|
||||
微信支付
|
||||
{elseif condition="$orderInfo['pay_type'] eq 'yue'"}
|
||||
余额支付
|
||||
{elseif condition="$orderInfo['pay_type'] eq 'offline'"}
|
||||
线下支付
|
||||
{else/}
|
||||
其他支付
|
||||
{/if}
|
||||
{else/}
|
||||
{if condition="$orderInfo['pay_type'] eq 'offline'"}
|
||||
线下支付
|
||||
{else/}
|
||||
未支付
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{notempty name="orderInfo.pay_time"}
|
||||
<div class="col-xs-6">支付时间: {$orderInfo.pay_time|date="Y/m/d H:i",###}</div>
|
||||
{/notempty}
|
||||
<div class="col-xs-6" style="color: #ff0005">用户备注: {$orderInfo.mark?:'无'}</div>
|
||||
<div class="col-xs-6" style="color: #733b5c">商家备注: {$orderInfo.remark?:'无'}</div>
|
||||
<div class="col-xs-6" style="color: #733AF9">推广人: {if $spread}{$spread}{else}无{/if}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{if condition="$orderInfo['delivery_type'] eq 'express'"}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
物流信息
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6" >快递公司: {$orderInfo.delivery_name}</div>
|
||||
<div class="col-xs-6">快递单号: {$orderInfo.delivery_id} | <button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('物流查询','{:Url('express',array('oid'=>$orderInfo['id']))}',{w:322,h:568})">物流查询</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{elseif condition="$orderInfo['delivery_type'] eq 'send'"}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
配送信息
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6" >送货人姓名: {$orderInfo.delivery_name}</div>
|
||||
<div class="col-xs-6">送货人电话: {$orderInfo.delivery_id}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
备注信息
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row show-grid">
|
||||
<div class="col-xs-6" >{if $orderInfo.mark}{$orderInfo.mark}{else}暂无备注信息{/if}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="{__FRAME_PATH}js/content.min.js?v=1.0.0"></script>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
|
||||
{/block}
|
||||
@ -1,79 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center">订单编号</th>
|
||||
<th class="text-center">操作记录</th>
|
||||
<th class="text-center">操作时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.oid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.change_message}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.change_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.btn-warning').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
// _this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '修改失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改优惠券的状态吗?','text':'修改后将无法恢复并且已发出的优惠券将失效,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
});
|
||||
$('.btn-danger').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要删除优惠券吗?','text':'删除后将无法恢复,请谨慎操作!','confirm':'是的,我要删除'})
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,278 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<link href="{__FRAME_PATH}css/plugins/footable/footable.core.css" rel="stylesheet">
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
<script src="{__PLUG_PATH}echarts.common.min.js"></script>
|
||||
<script src="{__FRAME_PATH}js/plugins/footable/footable.all.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline search-form">
|
||||
<div class="search-item" data-name="status">
|
||||
<span>订单状态:</span>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="">全部</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="0">未支付</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="1">未发货</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="2">待收货</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="3">待评价</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="4">交易完成</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="-1">退款中</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="-2">已退款</button>
|
||||
<input class="search-item-value" type="hidden" name="status" value="{$where.status}" />
|
||||
</div>
|
||||
<div class="search-item" data-name="combination_id">
|
||||
<span>订单类型:</span>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="">全部</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="普通订单">普通订单</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="拼团订单">拼团订单</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="秒杀订单">秒杀订单</button>
|
||||
<input class="search-item-value" type="hidden" name="combination_id" value="{$where.combination_id}" />
|
||||
</div>
|
||||
<div class="search-item" data-name="data">
|
||||
<span>创建时间:</span>
|
||||
<!-- <button type="button" class="btn btn-outline btn-link" data-value="">全部</button>-->
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.today}">今天</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.week}">本周</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.month}">本月</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.quarter}">本季度</button>
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="{$limitTimeList.year}">本年</button>
|
||||
<div class="datepicker" style="display: inline-block;">
|
||||
<button type="button" class="btn btn-outline btn-link" data-value="{$where.data?:'no'}">自定义</button>
|
||||
</div>
|
||||
<input class="search-item-value" type="hidden" name="data" value="{$where.data}" />
|
||||
</div>
|
||||
<hr>
|
||||
<?php $list_num = $list->toArray(); ?>
|
||||
<div class="col-sm-12" style="padding-bottom: 20px;">
|
||||
<div class="count-price">
|
||||
<span>售出商品:<strong class="h3 text-warning">{$price.total_num}</strong></span>
|
||||
</div>
|
||||
<div class="count-price">
|
||||
<span>订单数量:<strong class="h3 text-warning">{$list_num.total}</strong></span>
|
||||
</div>
|
||||
<div class="count-price">
|
||||
<span>订单金额:<strong class="h3 text-warning">¥{$price.pay_price}</strong></span>
|
||||
</div>
|
||||
<div class="count-price">
|
||||
<span>退款金额:<strong class="h3 text-warning">¥{$price.refund_price}</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>主要数据统计</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox-content" id="ec-goods-count" style="height:390px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox-content" id="ec-order-count" style="height:390px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function(){
|
||||
var option = {
|
||||
title: {
|
||||
text: '订单统计'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'horizontal',
|
||||
left: 'left',
|
||||
top: 25,
|
||||
data: <?=urldecode(json_encode(array_keys($orderCount)))?>,
|
||||
selected:<?php
|
||||
$data = [];
|
||||
$selected = [];
|
||||
foreach ($orderCount as $k=>$count){
|
||||
$data[] = ['value'=>$count,'name'=>$k];
|
||||
$selected[$k] = $count>0;
|
||||
}
|
||||
echo urldecode(json_encode($selected));
|
||||
?>
|
||||
},
|
||||
series : [
|
||||
{
|
||||
name: '订单数量',
|
||||
type: 'pie',
|
||||
radius : '55%',
|
||||
center: ['50%', '60%'],
|
||||
data:<?=urldecode(json_encode($data))?>,
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart = echarts.init(document.getElementById('ec-order-count'),'light');
|
||||
myChart.setOption(option);
|
||||
})();
|
||||
(function(){
|
||||
var option = {
|
||||
title: {
|
||||
text: '数据统计'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
data: <?=json_encode($orderDays)?>
|
||||
},
|
||||
yAxis: {
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
orient: 'horizontal',
|
||||
left: 'center',
|
||||
top: 25,
|
||||
data: ['商品数','订单数','订单金额','退款金额']
|
||||
},
|
||||
toolbox: {
|
||||
left: 'right',
|
||||
feature: {
|
||||
restore: {},
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
dataZoom: [{
|
||||
startValue: '<?php
|
||||
$index = count($orderDays) > 30 ? count($orderDays)-30 : 0;
|
||||
if(isset($orderDays[$index]))
|
||||
echo $orderDays[$index];
|
||||
?>'
|
||||
}, {
|
||||
type: 'inside'
|
||||
}],
|
||||
visualMap: {
|
||||
top: 10,
|
||||
right: 10,
|
||||
pieces: [{
|
||||
gt: 0,
|
||||
lte: 50,
|
||||
color: '#096'
|
||||
}, {
|
||||
gt: 50,
|
||||
lte: 100,
|
||||
color: '#ffde33'
|
||||
}, {
|
||||
gt: 100,
|
||||
lte: 150,
|
||||
color: '#ff9933'
|
||||
}, {
|
||||
gt: 150,
|
||||
lte: 200,
|
||||
color: '#cc0033'
|
||||
}, {
|
||||
gt: 200,
|
||||
lte: 300,
|
||||
color: '#660099'
|
||||
}, {
|
||||
gt: 300,
|
||||
color: '#7e0023'
|
||||
}],
|
||||
outOfRange: {
|
||||
color: '#999'
|
||||
}
|
||||
},
|
||||
series: <?= json_encode($orderCategory)?>
|
||||
};
|
||||
var myChart = echarts.init(document.getElementById('ec-goods-count'),'light');
|
||||
myChart.setOption(option);
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$(function init(){
|
||||
$('.search-item>.btn').on('click',function(){
|
||||
var that = $(this),value = that.data('value'),p = that.parent(),name = p.data('name'),form = p.parents();
|
||||
form.find('input[name="'+name+'"]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
form.submit();
|
||||
});
|
||||
$('.search-item-value').each(function(){
|
||||
var that = $(this),name = that.attr('name'), value = that.val(),dom = $('.search-item[data-name="'+name+'"] .btn[data-value="'+value+'"]');
|
||||
dom.eq(0).removeClass('btn-outline btn-link').addClass('btn-primary btn-sm')
|
||||
.siblings().addClass('btn-outline btn-link').removeClass('btn-primary btn-sm')
|
||||
});
|
||||
});
|
||||
$('.btn-order').on('click',function(){
|
||||
var that = $(this),value = that.data('value');
|
||||
$('input[name=order]').val(value);
|
||||
$('input[name=export]').val(0);
|
||||
$('form').submit();
|
||||
});
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '取消',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
//$("input[name=limit_time]").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("input[name=data]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
$('input[name=export]').val(0);
|
||||
$('form').submit();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,212 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline">
|
||||
<div class="input-group datepicker">
|
||||
<input style="width: 188px;" type="text" id="data" class="input-sm form-control" name="data" value="{$where.data}" placeholder="请选择日期" >
|
||||
</div>
|
||||
<select name="status" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">全部</option>
|
||||
<option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>进行中</option>
|
||||
<option value="2" {eq name="where.status" value="2"}selected="selected"{/eq}>已完成</option>
|
||||
<option value="3" {eq name="where.status" value="3"}selected="selected"{/eq}>未完成</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" id="no_export" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
<script>
|
||||
$('#export').on('click',function(){
|
||||
$('input[name=export]').val(1);
|
||||
});
|
||||
$('#no_export').on('click',function(){
|
||||
$('input[name=export]').val(0);
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">开团团长</th>
|
||||
<th class="text-center">开团时间</th>
|
||||
<th class="text-center">拼团产品</th>
|
||||
<th class="text-center">几人团</th>
|
||||
<th class="text-center">几人参加</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.uid|getUserNickname}/{$vo.uid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}/{$vo.cid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.people}人
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.count_people}人
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stop_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['status'] eq 1"}
|
||||
<span style="color: #00a0e9">进行中</span>
|
||||
{elseif condition="$vo['status'] eq 2"}
|
||||
<span style="color: #e933ce">已完成</span>
|
||||
{elseif condition="$vo['status'] eq 3"}
|
||||
<span style="color: #2725e9">未完成</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p><button class="btn btn-default btn-xs btn-outline" type="button" onclick="$eb.createModalFrame('查看详情','{:Url('order_pink',array('id'=>$vo['id']))}')"><i class="fa fa-newspaper-o"></i>查看详情</button></p>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
$('.btn-danger').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改收货状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
$('.offline_btn').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url'),pay_price =_this.data('pay');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改已支付'+pay_price+'元的状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
|
||||
$('.add_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id');
|
||||
$eb.$alert('textarea',{},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
$('.save_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id'),make=_this.data('make');
|
||||
$eb.$alert('textarea',{title:'请修改内容',value:make},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '清空',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
$("#data").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("#data").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,173 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">用户名称</th>
|
||||
<th class="text-center">用户头像</th>
|
||||
<th class="text-center">订单编号</th>
|
||||
<th class="text-center">金额</th>
|
||||
<th class="text-center">订单状态</th>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.nickname}/{$vo.uid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img class="open_image" style="max-width: 80px;" data-image="{$vo.avatar}" src="{$vo.avatar}" alt="{$vo.nickname}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{:Url('store.storeOrder/index')}?real_name={$vo.order_id_key|getOrderId}">{$vo.order_id}</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
¥{$vo.price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['is_refund']"}
|
||||
已退款
|
||||
{else/}
|
||||
未退款
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
$('.btn-danger').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改收货状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
$('.offline_btn').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url'),pay_price =_this.data('pay');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改已支付'+pay_price+'元的状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
|
||||
$('.add_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id');
|
||||
$eb.$alert('textarea',{},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
$('.save_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id'),make=_this.data('make');
|
||||
$eb.$alert('textarea',{title:'请修改内容',value:make},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '清空',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
$("#data").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("#data").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,79 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th class="text-center">订单编号</th>
|
||||
<th class="text-center">操作记录</th>
|
||||
<th class="text-center">操作时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.oid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.change_message}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.change_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.btn-warning').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
// _this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '修改失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改优惠券的状态吗?','text':'修改后将无法恢复并且已发出的优惠券将失效,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
});
|
||||
$('.btn-danger').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要删除优惠券吗?','text':'删除后将无法恢复,请谨慎操作!','confirm':'是的,我要删除'})
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,371 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
{include file="public/head"}
|
||||
<title>{$title|default=''}</title>
|
||||
<style>
|
||||
.demo-upload{
|
||||
display: block;
|
||||
height: 33px;
|
||||
text-align: center;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
margin-right: 4px;
|
||||
}
|
||||
.demo-upload img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-cover{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0,0,0,.6);
|
||||
}
|
||||
.demo-upload:hover .demo-upload-cover{
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-cover i{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
margin: 0 2px;
|
||||
}
|
||||
.check{color: #f00}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="store-attr" class="mp-form" v-cloak="">
|
||||
<i-Form :label-width="80" style="width: 100%" v-show="hidden == false">
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<i-Col span="5">
|
||||
<i-Button type="dashed" long @click="hiddenBool" icon="plus-round">添加新规则</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</i-Form>
|
||||
<i-Form :label-width="80" style="width: 100%" v-show="hidden == true">
|
||||
<Form-Item
|
||||
:label="'规则名称:'">
|
||||
<Row>
|
||||
<i-Col style="position: relative;margin-right: 6px" span="5"
|
||||
v-for="(item, index) in items"
|
||||
:key="index">
|
||||
<i-Input type="text" v-model="item.value" placeholder="设置名称"></i-Input>
|
||||
<i-Button style="position: absolute;top:0;right:0;margin-top:1px;border: none;font-size: 8px;line-height: 1.8" type="ghost" @click="handleRemove(index)" v-show="item.attrHidden == true"><Icon type="close-round" /></i-Button>
|
||||
<i-Button style="position: absolute;top:0;right:0;margin-top:1px;border: none;font-size: 8px;line-height: 1.8" type="ghost" @click="attrHiddenBool(item)" v-show="item.attrHidden == false"><Icon type="checkmark-round"></Icon></i-Button>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Button type="dashed" long @click="handleAdd" icon="plus-round">添加新规则</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
<Form-Item v-show="item.attrHidden == true"
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:label="''+item.value+':'" >
|
||||
<Row>
|
||||
<i-Col span="3"
|
||||
v-for="(attr,k) in item.detail"
|
||||
:key="attr"
|
||||
:name="attr">
|
||||
<Tag type="border" closable color="blue" @on-close="attrRemove(item,k)">{{ attr }}</Tag>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Input type="text" v-model="item.detailValue" placeholder="设置属性"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Button type="primary" style="margin-left: 6px" @click="attrAdd(item)">添加</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
<Form-Item v-show="hidden == true" style="width: 100%;">
|
||||
<Row style="margin: 0 88px 0 20px">
|
||||
<i-Col span="24">
|
||||
<i-Button type="primary" long @click="addGoods(true)">生成</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
|
||||
<template v-if="items[0].value!='' && items[0].detail.length>0 && attrs.length">
|
||||
<template v-for="(attr,index) in attrs">
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<template v-for="(item,index) in attr.detail">
|
||||
<i-Col span="3" style="margin-right: 3px">
|
||||
{{index}}:{{item}}
|
||||
</i-Col>
|
||||
</template>
|
||||
<i-Col span="5" style="margin-right: 3px">
|
||||
<span :class="attr.check ? 'check':''">金额:</span><i-Input placeholder="请输入金额" v-model="attr.price" style="width: 68%"
|
||||
:number="true"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="5" style="margin-right: 3px">
|
||||
<span :class="attr.check ? 'check':''">库存:</span><i-Input placeholder="请输入库存" v-model="attr.sales" style="width: 68%"
|
||||
:number="true"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="2" offset="1" style="margin-right: 3px">
|
||||
<div class="demo-upload">
|
||||
<img :src="attr.pic">
|
||||
<div class="demo-upload-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="openPic(attr.pic)" ></Icon>
|
||||
<Upload
|
||||
:show-upload-list="false"
|
||||
:on-success="uploadSuccess(attr)"
|
||||
:on-error="uploadError"
|
||||
:format="['jpg','jpeg','png']"
|
||||
:max-size="2048"
|
||||
accept="image/*"
|
||||
:on-format-error="uploadFormatError"
|
||||
action="{:Url('upload')}"
|
||||
style="display: inline-block"
|
||||
:goods="attr"
|
||||
>
|
||||
<Icon type="ios-cloud-upload-outline"></Icon>
|
||||
</Upload>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</i-Col>
|
||||
<i-Col span="2" style="margin-right: 3px">
|
||||
<i-Button type="ghost" @click="removeGoods(index)">删除</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</template>
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<!-- <i-Col span="10">-->
|
||||
<!-- <i-Button type="dashed" long @click="addGoods" icon="plus-round">添加新商品</i-Button>-->
|
||||
<!-- </i-Col>-->
|
||||
<i-Col span="2" offset="2">
|
||||
<i-Button type="primary" @click="submit">提交</i-Button>
|
||||
</i-Col>
|
||||
<i-Col span="2" offset="1">
|
||||
<i-Button type="error" @click="clear">清空所有属性</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</template>
|
||||
</i-Form>
|
||||
<Spin fix v-show="submiting == true">保存中...</Spin>
|
||||
</div>
|
||||
<script>
|
||||
var _vm ;
|
||||
mpFrame.start(function(Vue){
|
||||
new Vue({
|
||||
data () {
|
||||
return {
|
||||
hidden:false,
|
||||
submiting :false,
|
||||
items: <?php echo $result && isset($result['attr']) && !empty($result['attr']) ? json_encode($result['attr']) : 'false'; ?> || [
|
||||
{
|
||||
value: '',
|
||||
detailValue:'',
|
||||
attrHidden:false,
|
||||
detail:[]
|
||||
}
|
||||
],
|
||||
attrs:<?php echo $result && isset($result['value']) && !empty($result['value']) ? json_encode($result['value']) : '[]'; ?>
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
items:{
|
||||
handler:function(){
|
||||
// this.attrs = [];
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
attrHiddenBool(item){
|
||||
if(item.value == ''){
|
||||
$eb.message('error','请填写规则名称');
|
||||
}else{
|
||||
item.attrHidden = true;
|
||||
}
|
||||
},
|
||||
hiddenBool(){
|
||||
this.hidden = true;
|
||||
},
|
||||
handleAdd () {
|
||||
if(!this.checkAttr())return ;
|
||||
this.items.push({
|
||||
value: '',
|
||||
detailValue:'',
|
||||
attrHidden:false,
|
||||
detail:[]
|
||||
});
|
||||
},
|
||||
checkAttr(){
|
||||
var bool = true;
|
||||
this.items.map(function(item){
|
||||
if(!bool) return;
|
||||
if(!item.value){
|
||||
$eb.message('error','请填写规则名称');
|
||||
bool = false;
|
||||
}else if(!item.detail.length){
|
||||
$eb.message('error','请设置规则属性');
|
||||
bool = false;
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
},
|
||||
attrAdd (item) {
|
||||
if(!item.detailValue) return false;
|
||||
item.detail.push(item.detailValue);
|
||||
item.detailValue = '';
|
||||
},
|
||||
handleRemove (index) {
|
||||
if(this.items.length > 1)
|
||||
this.items.splice(index,1);
|
||||
else
|
||||
$eb.message('error','请设置至少一个规则');
|
||||
},
|
||||
attrRemove(item,k){
|
||||
if(1==item.detail.length){
|
||||
$eb.message('error','请设置至少一个属性');
|
||||
return false;
|
||||
}
|
||||
item.detail.splice(k,1);
|
||||
},
|
||||
removeGoods(index){
|
||||
this.attrs.splice(index,1);
|
||||
},
|
||||
checkGoods(){
|
||||
var bool = true;
|
||||
this.attrs.map(function(attr){
|
||||
if(!bool) return ;
|
||||
if(!Object.keys(attr.detail).length){
|
||||
$eb.message('error','请选择至少一个属性');
|
||||
bool = false;
|
||||
}else if(attr.price != parseFloat(attr.price) || attr.price < 0){
|
||||
$eb.message('error','请输入正确的商品价格');
|
||||
bool = false;
|
||||
}else if(attr.sales != parseInt(attr.sales) || attr.sales < 0){
|
||||
$eb.message('error','请输入正确的商品库存');
|
||||
bool = false;
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
},
|
||||
addGoods(type){
|
||||
var that = this;
|
||||
if(this.attrs.length){
|
||||
if(!this.checkGoods())return ;
|
||||
}
|
||||
$eb.axios.post("{:Url('is_format_attr',array('id'=>$id))}",{items:this.items,attrs:this.attrs}).then(function(res){
|
||||
if(res.data.code == 200){
|
||||
that.attrs = res.data.data
|
||||
}else{
|
||||
$eb.message('error',res.data.msg);
|
||||
}
|
||||
}).catch(function(err){
|
||||
if(res.data.code == 200){
|
||||
that.attrs = res.data.data
|
||||
}else{
|
||||
$eb.message('error',res.data.msg);
|
||||
}
|
||||
})
|
||||
// if(type === true){
|
||||
// this.attrs = [{
|
||||
// detail:{},
|
||||
// price:'',
|
||||
// sales:'',
|
||||
// pic:'{$image}'
|
||||
// }];
|
||||
// }else{
|
||||
// this.attrs.push({
|
||||
// detail:{},
|
||||
// price:'',
|
||||
// sales:'',
|
||||
// pic:'{$image}'
|
||||
// });
|
||||
// }
|
||||
},
|
||||
openPic(src){
|
||||
$eb.openImage(src);
|
||||
},
|
||||
uploadSuccess(data){
|
||||
return function(response, file, fileList){
|
||||
if(response.code == 200){
|
||||
data.pic = response.data.url;
|
||||
}else{
|
||||
$eb.message('error',response.data.msg || '图片上传失败!');
|
||||
}
|
||||
}
|
||||
},
|
||||
uploadError(error, file, fileList){
|
||||
$eb.message('error',error);
|
||||
},
|
||||
uploadFormatError(file, fileList){
|
||||
$eb.message('error','图片格式错误');
|
||||
},
|
||||
submit(){
|
||||
var that = this;
|
||||
that.submiting = true;
|
||||
if(!this.checkAttr() || !this.checkGoods()) return ;
|
||||
for(let attr in that.attrs){
|
||||
that.attrs[attr].check = false;
|
||||
}
|
||||
$eb.axios.post("{:Url('set_attr',array('id'=>$id))}",{items:this.items,attrs:this.attrs}).then(function(res){
|
||||
that.submiting = false;
|
||||
if(res.status == 200 && res.data.code == 200){
|
||||
$eb.message('success',res.data.msg || '编辑成功!');
|
||||
$eb.closeModalFrame(window.name);
|
||||
}else{
|
||||
$eb.message('error',res.data.msg || '请求失败!');
|
||||
}
|
||||
}).catch(function(err){
|
||||
$eb.message('error',err);
|
||||
})
|
||||
},
|
||||
clear(){
|
||||
var that = this;
|
||||
requirejs(['sweetalert'], function (swel) {
|
||||
swel({
|
||||
title: "您确定要清空产品属性吗",
|
||||
text: "删除后将无法恢复,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "是的,我要清空!",
|
||||
cancelButtonText: "让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function () {
|
||||
$eb.axios.post("{:Url('clear_attr',array('id'=>$id))}", {
|
||||
items: that.items,
|
||||
attrs: that.attrs
|
||||
}).then(function (res) {
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
$eb.message('success', res.data.msg || '清空成功!');
|
||||
window.location.reload();
|
||||
} else {
|
||||
$eb.message('error', res.data.msg || '清空失败!');
|
||||
}
|
||||
}).catch(function (err) {
|
||||
$eb.message('error', err);
|
||||
})
|
||||
}).catch(console.log);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted (){
|
||||
_vm = this;
|
||||
var resultAdmin = <?php echo $result && isset($result['attr']) && !empty($result['attr']) ? json_encode($result['attr']) : 'false'; ?>;
|
||||
if(resultAdmin) this.hidden = true;
|
||||
}
|
||||
}).$mount(document.getElementById('store-attr'));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
@ -1,148 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline">
|
||||
|
||||
<select name="status" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">产品状态</option>
|
||||
<option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>上架</option>
|
||||
<option value="0" {eq name="where.status" value="0"}selected="selected"{/eq}>下架</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" name="store_name" value="{$where.store_name}" placeholder="请输入活动标题" class="input-sm form-control" size="38"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">产品图片</th>
|
||||
<th class="text-center">活动标题</th>
|
||||
<th class="text-center" width="55%">活动简介</th>
|
||||
<th class="text-center">价格</th>
|
||||
<th class="text-center">库存</th>
|
||||
<th class="text-center">开始时间</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th class="text-center" width="8%">产品状态</th>
|
||||
<th class="text-center">内容</th>
|
||||
<th class="text-center" width="5%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$vo.image}" alt="{$vo.store_name}" class="open_image" data-image="{$vo.image}" style="width: 50px;height: 50px;cursor: pointer;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.info}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stock}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.start_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stop_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['status']"}
|
||||
{$vo.start_name}
|
||||
{else/}
|
||||
<i class="fa fa-close text-danger"></i>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('edit_content',array('id'=>$vo['id']))}')"><i class="fa fa-pencil"></i> 编辑内容</button>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div class="input-group-btn js-group-btn">
|
||||
<div class="btn-group">
|
||||
<button data-toggle="dropdown" class="btn btn-warning btn-xs dropdown-toggle"
|
||||
aria-expanded="false">操作
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{$vo.store_name}-属性','{:Url('attr',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-shekel"></i> 属性
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('编辑','{:Url('edit',array('id'=>$vo['id']))}')">
|
||||
<i class="fa fa-paste"></i> 编辑
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" id="delstor" data-url="{:Url('delete',array('id'=>$vo['id']))}">
|
||||
<i class="fa fa-warning"></i> 删除
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.js-group-btn').on('click',function(){
|
||||
$('.js-group-btn').css({zIndex:1});
|
||||
$(this).css({zIndex:2});
|
||||
});
|
||||
$('#delstor').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,46 +0,0 @@
|
||||
{include file="public/frame_head"}
|
||||
<style type="text/css" media="screen">
|
||||
td img{width: 35px; height: 35px;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">用户名称</th>
|
||||
<th class="text-center">用户头像</th>
|
||||
<th class="text-center">发送消息</th>
|
||||
<th class="text-center">发送时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<strong class="{$vo.uid == $to_uid ? 'text-danger' : 'text-success'}">
|
||||
{$vo.nickname}
|
||||
</strong>
|
||||
</td>
|
||||
<td class="text-center"><img src="{$vo.avatar}" class="head_image" data-image="{$vo.avatar}" width="35" height="35"></td>
|
||||
<td class="text-center">{$vo.msn}</td>
|
||||
<td class="text-center">{$vo.add_time|date='Y-m-d H:i:s',###}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('td img').on('click',function (e) {
|
||||
var image = $(this).attr("src");
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
{include file="public/inner_footer"}
|
||||
@ -1,32 +0,0 @@
|
||||
{include file="public/frame_head"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">用户名称</th>
|
||||
<th class="text-center">用户头像</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">{$vo.nickname}</td>
|
||||
<td class="text-center"><img src="{$vo.headimgurl}" class="head_image" data-image="{$vo.headimgurl}" width="35" height="35"></td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-info btn-xs" type="button" onclick="window.location.href='{:Url('chat_list',array('uid'=>$now_service['uid'],'to_uid'=>$vo['uid']))}'"><i class="fa fa-commenting-o"></i> 查看对话</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="public/inner_footer"}
|
||||
@ -1,157 +0,0 @@
|
||||
{include file="public/frame_head"}
|
||||
<link href="{__FRAME_PATH}css/plugins/iCheck/custom.css" rel="stylesheet">
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
<script src="{__ADMIN_PATH}frame/js/plugins/iCheck/icheck.min.js"></script>
|
||||
<style type="text/css">
|
||||
.form-inline .input-group{display: inline-table;vertical-align: middle;}
|
||||
.form-inline .input-group .input-group-btn{width: auto;}
|
||||
.form-add{position: fixed;left: 0;bottom: 0;width:100%;}
|
||||
.form-add .sub-btn{border-radius: 0;width: 100%;padding: 6px 0;font-size: 14px;outline: none;border: none;color: #fff;background-color: #2d8cf0;}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form class="form-inline search" id="form" method="get">
|
||||
<div class="input-group datepicker">
|
||||
<input style="width: 200px;" type="text" id="data" class="input-sm form-control" name="data" value="{$where.data}" placeholder="请选择日期" >
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input style="width: 200px;" type="text" name="nickname" value="{$where.nickname}" placeholder="请输入微信用户名称" class="input-sm form-control"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search"></i>搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"></th>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">微信用户名称</th>
|
||||
<th class="text-center">头像</th>
|
||||
<th class="text-center">性别</th>
|
||||
<th class="text-center">地区</th>
|
||||
<th class="text-center">是否关注公众号</th>
|
||||
<th class="text-center">首次关注时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
<form method="post" class="sub-save">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<label class="checkbox-inline i-checks">
|
||||
<input type="checkbox" name="ids[]" value="{$vo.uid}">
|
||||
</label>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.uid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.nickname}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$vo.headimgurl}" alt="{$vo.nickname}" title="{$vo.nickname}" style="width:50px;height: 50px;cursor: pointer;" class="head_image" data-image="{$vo.headimgurl}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['sex'] eq 1"}
|
||||
男
|
||||
{elseif condition="$vo['sex'] eq 2"/}
|
||||
女
|
||||
{else/}
|
||||
保密
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.country}{$vo.province}{$vo.city}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['subscribe']"}
|
||||
关注
|
||||
{else/}
|
||||
取消
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date="Y-m-d H:i:s",###}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</form>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-add">
|
||||
<button type="submit" class="sub-btn">提交</button>
|
||||
</div>
|
||||
<script>
|
||||
$('.i-checks').iCheck({
|
||||
checkboxClass: 'icheckbox_square-green',
|
||||
});
|
||||
$('.head_image').on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '清空',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
$("#data").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("#data").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
});
|
||||
$(".sub-btn").on("click",function(){
|
||||
var formData = {checked_menus:[]};
|
||||
$("input[name='ids[]']:checked").each(function(){
|
||||
formData.checked_menus.push($(this).val());
|
||||
});
|
||||
$eb.axios.post("{$save}",formData).then((res)=>{
|
||||
if(res.status && res.data.code == 200)
|
||||
return Promise.resolve(res.data);
|
||||
else
|
||||
return Promise.reject(res.data.msg || '添加失败,请稍候再试!');
|
||||
}).then((res)=>{
|
||||
$eb.message('success',res.msg || '操作成功!');
|
||||
$eb.closeModalFrame(window.name);
|
||||
}).catch((err)=>{
|
||||
this.loading=false;
|
||||
$eb.message('error',err);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{include file="public/inner_footer"}
|
||||
@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
{include file="public/head"}
|
||||
<title>{$title}</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="form-add" class="mp-form" v-cloak="">
|
||||
<form-builder></form-builder>
|
||||
</div>
|
||||
<script>
|
||||
var _vm ;
|
||||
_mpApi = parent._mpApi;
|
||||
|
||||
mpFrame.start(function(Vue){
|
||||
require(['axios','system/util/mpFormBuilder'],function(axios,mpFormBuilder){
|
||||
Vue.use(mpFormBuilder,_mpApi,<?php echo $groups; ?>,{
|
||||
action:'{$save}'
|
||||
});
|
||||
new Vue({
|
||||
el:"#form-add",
|
||||
mounted:function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
@ -1,161 +0,0 @@
|
||||
{include file="public/frame_head"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">添加产品</button>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline">
|
||||
<select name="is_show" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">产品状态</option>
|
||||
<option value="1" {eq name="where.is_show" value="1"}selected="selected"{/eq}>上架</option>
|
||||
<option value="0" {eq name="where.is_show" value="0"}selected="selected"{/eq}>下架</option>
|
||||
</select>
|
||||
<select name="is_hot" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">热卖单品</option>
|
||||
<option value="1" {eq name="where.is_hot" value="1"}selected="selected"{/eq}>是</option>
|
||||
<option value="0" {eq name="where.is_hot" value="0"}selected="selected"{/eq}>否</option>
|
||||
</select>
|
||||
<select name="is_benefit" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">促销单品</option>
|
||||
<option value="1" {eq name="where.is_benefit" value="1"}selected="selected"{/eq}>是</option>
|
||||
<option value="0" {eq name="where.is_benefit" value="0"}selected="selected"{/eq}>否</option>
|
||||
</select>
|
||||
<select name="is_best" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">精品推荐</option>
|
||||
<option value="1" {eq name="where.is_best" value="1"}selected="selected"{/eq}>是</option>
|
||||
<option value="0" {eq name="where.is_best" value="0"}selected="selected"{/eq}>否</option>
|
||||
</select>
|
||||
<select name="is_new" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">首发新品</option>
|
||||
<option value="1" {eq name="where.is_new" value="1"}selected="selected"{/eq}>是</option>
|
||||
<option value="0" {eq name="where.is_new" value="0"}selected="selected"{/eq}>否</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<input type="text" name="store_name" value="{$where.store_name}" placeholder="请输入产品名称或者关键字" class="input-sm form-control" size="38"> <span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i> 搜索</button> </span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">产品图片</th>
|
||||
<th class="text-center">产品名称</th>
|
||||
<th class="text-center">产品分类</th>
|
||||
<th class="text-center">价格</th>
|
||||
<th class="text-center">产品状态</th>
|
||||
<th class="text-center">热卖单品</th>
|
||||
<th class="text-center">促销单品</th>
|
||||
<th class="text-center">精品推荐</th>
|
||||
<th class="text-center">首发新品</th>
|
||||
<th class="text-center">库存</th>
|
||||
<th class="text-center">点赞</th>
|
||||
<th class="text-center">收藏</th>
|
||||
<th class="text-center">内容</th>
|
||||
<th class="text-center">秒杀</th>
|
||||
<th class="text-center">操作</th>
|
||||
<th class="text-center">评论</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img src="{$vo.image}" alt="{$vo.store_name}" class="open_image" data-image="{$vo.image}" style="width: 50px;height: 50px;cursor: pointer;">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.store_name}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.cate_name}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_show' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_hot' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_benefit' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_best' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.is_new' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stock}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="btn btn-xs btn-white" {if condition="$vo['collect'] gt 0"}onclick="$eb.createModalFrame('点赞','{:Url('collect',array('id'=>$vo['id']))}')"{/if} style="cursor: pointer">
|
||||
<i class="fa fa-thumbs-up"></i> {$vo.collect}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="btn btn-xs btn-white" {if condition="$vo['like'] gt 0"}onclick="$eb.createModalFrame('收藏','{:Url('like',array('id'=>$vo['id']))}')"{/if} style="cursor: pointer">
|
||||
<i class="fa fa-heart"></i> {$vo.like}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-xs btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('edit_content',array('id'=>$vo['id']))}')"><i class="fa fa-pencil"></i> 编辑内容</button>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-success btn-xs" type="button" onclick="$eb.createModalFrame('开启秒杀','{:Url('seckill',array('id'=>$vo['id']))}')"><i class="fa fa-forumbee"></i> 开启秒杀</button></td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-default btn-xs" type="button" onclick="$eb.createModalFrame('属性','{:Url('attr',array('id'=>$vo['id']))}')"><i class="fa fa-shekel"></i> 属性</button>
|
||||
<button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('编辑','{:Url('edit',array('id'=>$vo['id']))}')"><i class="fa fa-paste"></i> 编辑</button>
|
||||
<button class="btn btn-warning btn-xs" data-url="{:Url('delete',array('id'=>$vo['id']))}" type="button"><i class="fa fa-warning"></i> 删除
|
||||
</button>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{:Url('store.storeProductReply/index',array('product_id'=>$vo['id']))}">查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.btn-warning').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
});
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
|
||||
{include file="public/inner_footer"}
|
||||
@ -1,74 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">添加客服</button>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">微信用户名称</th>
|
||||
<th class="text-center">客服头像</th>
|
||||
<th class="text-center">客服名称</th>
|
||||
<th class="text-center">是否显示</th>
|
||||
<th class="text-center">添加时间</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">{$vo.id}</td>
|
||||
<td class="text-center">{$vo.wx_name}</td>
|
||||
<td class="text-center"><img src="{$vo.avatar}" class="head_image" data-image="{$vo.avatar}" width="35" height="35"></td>
|
||||
<td class="text-center">{$vo.nickname}</td>
|
||||
<td class="text-center">
|
||||
<i class="fa {eq name='vo.status' value='1'}fa-check text-navy{else/}fa-close text-danger{/eq}"></i>
|
||||
</td>
|
||||
<td class="text-center">{$vo.add_time|date='Y-m-d H:i:s',###}</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('聊天记录','{:Url('chat_user',array('id'=>$vo['id']))}')"><i class="fa fa-commenting-o"></i> 聊天记录</button>
|
||||
<button class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('编辑','{:Url('edit',array('id'=>$vo['id']))}')"><i class="fa fa-paste"></i> 编辑</button>
|
||||
<button class="btn btn-warning btn-xs" data-url="{:Url('delete',array('id'=>$vo['id']))}" type="button"><i class="fa fa-warning"></i> 删除</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$('.btn-warning').on('click',function(){
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
console.log(res);
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
_this.parents('tr').remove();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
});
|
||||
$('.head_image').on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
{/block}
|
||||
@ -1,443 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<link href="{__FRAME_PATH}css/plugins/footable/footable.core.css" rel="stylesheet">
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
<script src="{__PLUG_PATH}echarts.common.min.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="m-b m-l">
|
||||
<div action="" class="form-inline">
|
||||
<div class="search-item" data-name="status">
|
||||
<span>创建时间:</span>
|
||||
<a class="btn {if !$where.data && $where.date==''}btn-primary btn-sm {else}btn-outline btn-link{/if}" href="{:Url('index',['date'=>''])}">全部</a>
|
||||
<a class="btn {if !$where.data && $where.date=='today'}btn-primary btn-sm {else}btn-outline btn-link{/if}" href="{:Url('index',['date'=>'today'])}">今天</a>
|
||||
<a class="btn {if !$where.data && $where.date=='week'}btn-primary btn-sm{else}btn-outline btn-link{/if}" href="{:Url('index',['date'=>'week'])}">本周</a>
|
||||
<a class="btn {if !$where.data && $where.date=='month'}btn-primary btn-sm{else}btn-outline btn-link{/if}" href="{:Url('index',['date'=>'month'])}">本月</a>
|
||||
<a class="btn {if !$where.data && $where.date=='quarter'}btn-primary btn-sm{else}btn-outline btn-link{/if}" href="{:Url('index',['date'=>'quarter'])}">本季度</a>
|
||||
<a class="btn {if !$where.data && $where.date=='year'}btn-primary btn-sm{else}btn-outline btn-link{/if}" href="{:Url('index',['date'=>'year'])}">本年</a>
|
||||
<div class="datepicker" style="display: inline-block;">
|
||||
<a class="btn btn-link {if $where.data}btn-primary{else}btn-outline{/if}" href="javascript:(0)" data-value="{$where.data?:'no'}">自定义</a>
|
||||
</div>
|
||||
<form action="">
|
||||
<input class="search-item-value" type="hidden" name="data" value="{$where.data}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
{volist name='header' id='val'}
|
||||
<div class="col-sm-3">
|
||||
<div class="widget style1 {$val.color}-bg" style="height: 120px;">
|
||||
<div class="row" style="margin-top: 16px;padding: 0 20px;">
|
||||
<div class="col-xs-4">
|
||||
<i class="fa {$val.class} fa-5x"></i>
|
||||
</div>
|
||||
<div class="col-xs-8 text-right">
|
||||
<span> {$val.name} </span>
|
||||
<h2 class="font-bold">{$val.value}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--------------------------->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-8">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>主要数据统计</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<!-- <a class="close-link">-->
|
||||
<!-- <i class="fa fa-times"></i>-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div id="ec-goods-count" style="height:390px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>支付方式</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<!-- <a class="close-link">-->
|
||||
<!-- <i class="fa fa-times"></i>-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div id="ec-order-count" style="height:390px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>支出详情</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<!-- <a class="close-link">-->
|
||||
<!-- <i class="fa fa-times"></i>-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div id="ec-zhichu-count" style="height:300px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>营收详情</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<!-- <a class="close-link">-->
|
||||
<!-- <i class="fa fa-times"></i>-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div id="ec-revenue-count" style="height:300px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>最近交易记录</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
<!-- <a class="close-link">-->
|
||||
<!-- <i class="fa fa-times"></i>-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" >
|
||||
<div id="ec-new-count" style="height:300px;">
|
||||
{volist name="trans" id="vo"}
|
||||
<div class="col-sm-3 col-xs-3"><h4 class="text-overflow">{$vo.nickname}</h4></div>
|
||||
<div class="col-sm-6 col-xs-6"><h4 class="text-overflow">购买{$vo.store_name}</h4></div>
|
||||
<div class="col-sm-3 col-xs-3"><h4 class="text-overflow">¥{$vo.pay_price}</h4></div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox-content">
|
||||
|
||||
<div class="text-left">
|
||||
{if condition="$price['pay_price_wx'] GT 0"}
|
||||
<div class="count-price">
|
||||
<span>微信支付金额:<strong class="text-danger">¥{$price.pay_price_wx}</strong></span>
|
||||
</div>
|
||||
{/if}
|
||||
{if condition="$price['pay_price_yue'] GT 0"}
|
||||
<div class="count-price">
|
||||
<span>余额支付金额:<strong class="text-danger">¥{$price.pay_price_yue}</strong></span>
|
||||
</div>
|
||||
{/if}
|
||||
{if condition="$price['pay_price_offline'] GT 0"}
|
||||
<div class="count-price">
|
||||
<span>线下支付金额:<strong class="text-danger">¥{$price.pay_price_offline}</strong></span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="m-t-n-lg text-right">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-sm btn-info btn-outline" href="{:Url('index',['export'=>'1'])}">Excel导出</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{__FRAME_PATH}js/content.min.js?v=1.0.0"></script>
|
||||
<script>
|
||||
(function(){
|
||||
var option = {
|
||||
title: {
|
||||
text: '数据统计'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
splitLine: {show: false},
|
||||
data: <?=json_encode($orderDays)?>
|
||||
},
|
||||
yAxis: {
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
type: 'value'
|
||||
},
|
||||
legend: {
|
||||
orient: 'horizontal',
|
||||
left: 'center',
|
||||
top: 25,
|
||||
data: ['营业额','支出','盈利']
|
||||
},
|
||||
toolbox: {
|
||||
left: 'right',
|
||||
feature: {
|
||||
restore: {},
|
||||
saveAsImage: {}
|
||||
}
|
||||
},
|
||||
//dataZoom: [{
|
||||
// startValue: '<?php
|
||||
// $index = count($orderDays) > 30 ? count($orderDays)-30 : 0;
|
||||
// if(isset($orderDays[$index]))
|
||||
// echo $orderDays[$index];
|
||||
// ?>//'
|
||||
//}, {
|
||||
// type: 'inside'
|
||||
//}],
|
||||
visualMap: {
|
||||
top: 10,
|
||||
right: 10,
|
||||
pieces: [{
|
||||
gt: 0,
|
||||
lte: 50,
|
||||
color: '#096'
|
||||
}, {
|
||||
gt: 50,
|
||||
lte: 100,
|
||||
color: '#ffde33'
|
||||
}, {
|
||||
gt: 100,
|
||||
lte: 150,
|
||||
color: '#ff9933'
|
||||
}, {
|
||||
gt: 150,
|
||||
lte: 200,
|
||||
color: '#cc0033'
|
||||
}, {
|
||||
gt: 200,
|
||||
lte: 300,
|
||||
color: '#660099'
|
||||
}, {
|
||||
gt: 300,
|
||||
color: '#7e0023'
|
||||
}],
|
||||
outOfRange: {
|
||||
color: '#999'
|
||||
}
|
||||
},
|
||||
series: <?= json_encode($Statistic)?>
|
||||
};
|
||||
var myChart = echarts.init(document.getElementById('ec-goods-count'),'light');
|
||||
myChart.setOption(option);
|
||||
})();
|
||||
(function(){
|
||||
var option = {
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b}: {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
x: 'left',
|
||||
data:['商品成本','优惠券抵扣','积分抵扣','推广人佣金','会员充值赠送']
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name:'支出',
|
||||
type:'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
fontSize: '15',
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
normal: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
data:<?= json_encode($data)?>
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart = echarts.init(document.getElementById('ec-zhichu-count'),'light');
|
||||
myChart.setOption(option);
|
||||
})();
|
||||
(function(){
|
||||
var option = {
|
||||
color: ['#3398DB'],
|
||||
tooltip : {
|
||||
trigger: 'axis',
|
||||
axisPointer : {
|
||||
type : 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
top: '4%',
|
||||
containLabel: true
|
||||
},
|
||||
yAxis : [
|
||||
{
|
||||
inverse:true,
|
||||
axisLine: {show: false},
|
||||
type : 'category',
|
||||
data : ['1、普通商品', '2、拼团商品', '3、会员充值','4、秒杀商品'],
|
||||
axisTick: {
|
||||
alignWithLabel: true
|
||||
}
|
||||
}
|
||||
],
|
||||
xAxis : [
|
||||
{
|
||||
show:false,
|
||||
type : 'value'
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'金额',
|
||||
type:'bar',
|
||||
barWidth: '60%',
|
||||
data:<?= json_encode([$ordinary,$pink,$recharge,$seckill])?>
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart = echarts.init(document.getElementById('ec-revenue-count'),'light');
|
||||
myChart.setOption(option);
|
||||
})();
|
||||
(function(){
|
||||
var option = {
|
||||
title: {
|
||||
text: '支付统计'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient: 'horizontal',
|
||||
left: 'left',
|
||||
top: 25,
|
||||
data: <?=urldecode(json_encode(array_keys($orderCount)))?>,
|
||||
selected:<?php
|
||||
$data = [];
|
||||
$selected = [];
|
||||
foreach ($orderCount as $k=>$count){
|
||||
$data[] = ['value'=>$count,'name'=>$k];
|
||||
$selected[$k] = $count>0;
|
||||
}
|
||||
echo urldecode(json_encode($selected));
|
||||
?>
|
||||
},
|
||||
series : [
|
||||
{
|
||||
name: '订单数量',
|
||||
type: 'pie',
|
||||
radius : '55%',
|
||||
center: ['50%', '60%'],
|
||||
data:<?=urldecode(json_encode($data))?>,
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart = echarts.init(document.getElementById('ec-order-count'),'light');
|
||||
myChart.setOption(option);
|
||||
})();
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '取消',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("input[name=data]").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
$('form').submit();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,228 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script type="text/javascript" src="{__PLUG_PATH}jquery.downCount.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>砍价产品搜索</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
|
||||
目前拥有{$countBargain}个砍价产品
|
||||
</div>
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">搜 索:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="store_name" lay-verify="store_name" style="width: 100%" autocomplete="off" placeholder="请输入产品名称,编号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">砍价状态:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="status" lay-verify="status">
|
||||
<option value="">全部</option>
|
||||
<option value="1">开启</option>
|
||||
<option value="0">关闭</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">
|
||||
<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="search" style="font-size:14px;line-height: 9px;">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索</button>
|
||||
<button lay-submit="export" lay-filter="export" class="layui-btn layui-btn-primary layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-delete layuiadmin-button-btn" ></i> Excel导出</button>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-content">
|
||||
<div class="table-responsive" style="margin-top: 20px;">
|
||||
<!-- <div class="layui-btn-group conrelTable">-->
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" type="button" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')"><i class="fa fa-check-circle-o"></i>添加砍价</button>-->
|
||||
<!-- </div>-->
|
||||
<table class="layui-hide" id="bargainList" lay-filter="bargainList"></table>
|
||||
<script type="text/html" id="status">
|
||||
<input type='checkbox' name='status' lay-skin='switch' value="{{d.id}}" lay-filter='status' lay-text='开启|关闭' {{ d.status == 1 ? 'checked' : '' }}>
|
||||
</script>
|
||||
<script type="text/html" id="statusCn">
|
||||
{{ d.status == 1 ? d.start_name : '关闭' }}
|
||||
</script>
|
||||
<script type="text/html" id="stopTime">
|
||||
<div class="count-time-{{d.id}}" data-time="{{d._stop_time}}">
|
||||
<span class="days">00</span>
|
||||
:
|
||||
<span class="hours">00</span>
|
||||
:
|
||||
<span class="minutes">00</span>
|
||||
:
|
||||
<span class="seconds">00</span>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)"><i class="layui-icon layui-icon-util"></i>操作</button>
|
||||
<ul class="layui-nav-child layui-anim layui-anim-upbit">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.title}}-编辑','{:Url('edit')}?id={{d.id}}')"><i class="layui-icon layui-icon-edit"></i> 编辑</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.title}}-编辑内容','{:Url('edit_content')}?id={{d.id}}')"><i class="fa fa-pencil"></i> 编辑内容</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.title}}-编辑规则','{:Url('edit_rule')}?id={{d.id}}')"><i class="layui-icon layui-icon-edit"></i>编辑规则</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="delstor" lay-event='delstor'><i class="layui-icon layui-icon-delete"></i> 删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script src="{__ADMIN_PATH}js/layuiList.js"></script>
|
||||
<script src="{__FRAME_PATH}js/content.min.js?v=1.0.0"></script>
|
||||
<script>
|
||||
layList.form.render();
|
||||
window.$bargainId = <?php echo json_encode($bargainId);?>;
|
||||
$(document).on('click','#time',function () {
|
||||
var arr = $('#time').text().split(' - ');
|
||||
var reg = new RegExp("-","g");//g,表示全部替换。
|
||||
var newArr = [];
|
||||
if(arr.length >1){
|
||||
$.each(arr,function (index,item) {
|
||||
newArr.push(item.replace(reg,"/"));
|
||||
})
|
||||
$('#time').data('value',newArr.join(' - '));
|
||||
}
|
||||
});
|
||||
layList.tableList('bargainList',"{:Url('get_bargain_list')}",function () {
|
||||
return [
|
||||
{field: 'id', title: '编号', sort: true,width:'5%',event:'id'},
|
||||
{field: 'image', title: '砍价图片',event:'open_image', width: '8%',templet: '<p><img src="{{d.image}}" alt="{{d.title}}"></p>'},
|
||||
{field: 'title', title: '砍价名称',width:'10%'},
|
||||
{field: 'price', title: '砍价价格',width:'6%'},
|
||||
{field: 'bargain_min_price', title: '砍价区间',width:'8%',templet: '<span>{{d.bargain_min_price}}~{{d.bargain_max_price}}</span>'},
|
||||
{field: 'min_price', title: '最低价',width:'8%'},
|
||||
{field: 'status', title: '砍价状态',width:'8%',templet:"#status"},
|
||||
{field: 'count_people_all', title: '参与人数',width:'6%',templet: '<span>【{{d.count_people_all}}】人</span>'},
|
||||
{field: 'count_people_help', title: '帮忙砍价人数',width:'6%',templet: '<span>【{{d.count_people_help}}】人</span>'},
|
||||
{field: 'count_people_success', title: '砍价成功人数',width:'6%',templet: '<span>【{{d.count_people_success}}】人</span>'},
|
||||
{field: 'look', title: '浏览量',width:'5%'},
|
||||
{field: 'stock', title: '库存',width:'4%'},
|
||||
{field: '_stop_time', title: '结束时间', width: '10%',toolbar: '#stopTime'},
|
||||
{field: 'right', title: '操作', width: '10%', align: 'center', toolbar: '#barDemo'}
|
||||
]
|
||||
});
|
||||
// layList.date('time');
|
||||
layList.laydate.render({
|
||||
elem:'#time',
|
||||
trigger:'click',
|
||||
eventElem:'#zdy_time',
|
||||
range:true,
|
||||
});
|
||||
setTime();
|
||||
function setTime(){
|
||||
setTimeout(function () {
|
||||
$.each($bargainId,function (index,item) {
|
||||
console.log($('.count-time-'+item).attr('data-time'));
|
||||
$('.count-time-'+item).downCount({
|
||||
date: $('.count-time-'+item).attr('data-time'),
|
||||
offset: +8
|
||||
});
|
||||
})
|
||||
},3000);
|
||||
}
|
||||
layList.search('search',function(where){
|
||||
layList.reload(where);
|
||||
setTime();
|
||||
});
|
||||
layList.search('export',function(where){
|
||||
location.href=layList.U({c:'ump.store_bargain',a:'get_bargain_list',q:{
|
||||
store_name:where.store_name,
|
||||
status:where.status,
|
||||
export:1,
|
||||
}});
|
||||
})
|
||||
layList.switch('status',function (odj,value,name){
|
||||
if(odj.elem.checked==true){
|
||||
layList.baseGet(layList.Url({c:'ump.store_bargain',a:'set_bargain_status',p:{status:1,id:value}}),function (res) {
|
||||
layList.msg(res.msg);
|
||||
});
|
||||
}else{
|
||||
layList.baseGet(layList.Url({c:'ump.store_bargain',a:'set_bargain_status',p:{status:0,id:value}}),function (res) {
|
||||
layList.msg(res.msg);
|
||||
});
|
||||
}
|
||||
});
|
||||
layList.tool(function (event,data,obj) {
|
||||
switch (event) {
|
||||
case 'delstor':
|
||||
var url=layList.U({c:'ump.store_bargain',a:'delete',q:{id:data.id}});
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
obj.del();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
break;
|
||||
}
|
||||
})
|
||||
$(document).click(function (e) {
|
||||
$('.layui-nav-child').hide();
|
||||
})
|
||||
function dropdown(that){
|
||||
var oEvent = arguments.callee.caller.arguments[0] || event;
|
||||
oEvent.stopPropagation();
|
||||
var offset = $(that).offset();
|
||||
var top=offset.top-$(window).scrollTop();
|
||||
var index = $(that).parents('tr').data('index');
|
||||
$('.layui-nav-child').each(function (key) {
|
||||
if (key != index) {
|
||||
$(this).hide();
|
||||
}
|
||||
})
|
||||
if($(document).height() < top+$(that).next('ul').height()){
|
||||
$(that).next('ul').css({
|
||||
'padding': 10,
|
||||
'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
|
||||
'min-width': 'inherit',
|
||||
'position': 'absolute'
|
||||
}).toggle();
|
||||
}else{
|
||||
$(that).next('ul').css({
|
||||
'padding': 10,
|
||||
'top':$(that).parent('td').height() / 2 + $(that).height(),
|
||||
'min-width': 'inherit',
|
||||
'position': 'absolute'
|
||||
}).toggle();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,371 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
{include file="public/head"}
|
||||
<title>{$title|default=''}</title>
|
||||
<style>
|
||||
.demo-upload{
|
||||
display: block;
|
||||
height: 33px;
|
||||
text-align: center;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,.2);
|
||||
margin-right: 4px;
|
||||
}
|
||||
.demo-upload img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-cover{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0,0,0,.6);
|
||||
}
|
||||
.demo-upload:hover .demo-upload-cover{
|
||||
display: block;
|
||||
}
|
||||
.demo-upload-cover i{
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
margin: 0 2px;
|
||||
}
|
||||
.check{color: #f00}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="store-attr" class="mp-form" v-cloak="">
|
||||
<i-Form :label-width="80" style="width: 100%" v-show="hidden == false">
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<i-Col span="5">
|
||||
<i-Button type="dashed" long @click="hiddenBool" icon="plus-round">添加新规则</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</i-Form>
|
||||
<i-Form :label-width="80" style="width: 100%" v-show="hidden == true">
|
||||
<Form-Item
|
||||
:label="'规则名称:'">
|
||||
<Row>
|
||||
<i-Col style="position: relative;margin-right: 6px" span="5"
|
||||
v-for="(item, index) in items"
|
||||
:key="index">
|
||||
<i-Input type="text" v-model="item.value" placeholder="设置名称"></i-Input>
|
||||
<i-Button style="position: absolute;top:0;right:0;margin-top:1px;border: none;font-size: 8px;line-height: 1.8" type="ghost" @click="handleRemove(index)" v-show="item.attrHidden == true"><Icon type="close-round" /></i-Button>
|
||||
<i-Button style="position: absolute;top:0;right:0;margin-top:1px;border: none;font-size: 8px;line-height: 1.8" type="ghost" @click="attrHiddenBool(item)" v-show="item.attrHidden == false"><Icon type="checkmark-round"></Icon></i-Button>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Button type="dashed" long @click="handleAdd" icon="plus-round">添加新规则</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
<Form-Item v-show="item.attrHidden == true"
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
:label="''+item.value+':'" >
|
||||
<Row>
|
||||
<i-Col span="3"
|
||||
v-for="(attr,k) in item.detail"
|
||||
:key="attr"
|
||||
:name="attr">
|
||||
<Tag type="border" closable color="blue" @on-close="attrRemove(item,k)">{{ attr }}</Tag>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Input type="text" v-model="item.detailValue" placeholder="设置属性"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="5">
|
||||
<i-Button type="primary" style="margin-left: 6px" @click="attrAdd(item)">添加</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
<Form-Item v-show="hidden == true" style="width: 100%;">
|
||||
<Row style="margin: 0 88px 0 20px">
|
||||
<i-Col span="24">
|
||||
<i-Button type="primary" long @click="addGoods(true)">生成</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
|
||||
<template v-if="items[0].value!='' && items[0].detail.length>0 && attrs.length">
|
||||
<template v-for="(attr,index) in attrs">
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<template v-for="(item,index) in attr.detail">
|
||||
<i-Col span="3" style="margin-right: 3px">
|
||||
{{index}}:{{item}}
|
||||
</i-Col>
|
||||
</template>
|
||||
<i-Col span="5" style="margin-right: 3px">
|
||||
<span :class="attr.check ? 'check':''">金额:</span><i-Input placeholder="请输入金额" v-model="attr.price" style="width: 68%"
|
||||
:number="true"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="5" style="margin-right: 3px">
|
||||
<span :class="attr.check ? 'check':''">库存:</span><i-Input placeholder="请输入库存" v-model="attr.sales" style="width: 68%"
|
||||
:number="true"></i-Input>
|
||||
</i-Col>
|
||||
<i-Col span="2" offset="1" style="margin-right: 3px">
|
||||
<div class="demo-upload">
|
||||
<img :src="attr.pic">
|
||||
<div class="demo-upload-cover">
|
||||
<Icon type="ios-eye-outline" @click.native="openPic(attr.pic)" ></Icon>
|
||||
<Upload
|
||||
:show-upload-list="false"
|
||||
:on-success="uploadSuccess(attr)"
|
||||
:on-error="uploadError"
|
||||
:format="['jpg','jpeg','png']"
|
||||
:max-size="2048"
|
||||
accept="image/*"
|
||||
:on-format-error="uploadFormatError"
|
||||
action="{:Url('upload')}"
|
||||
style="display: inline-block"
|
||||
:goods="attr"
|
||||
>
|
||||
<Icon type="ios-cloud-upload-outline"></Icon>
|
||||
</Upload>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</i-Col>
|
||||
<i-Col span="2" style="margin-right: 3px">
|
||||
<i-Button type="ghost" @click="removeGoods(index)">删除</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</template>
|
||||
<Form-Item>
|
||||
<Row>
|
||||
<!-- <i-Col span="10">-->
|
||||
<!-- <i-Button type="dashed" long @click="addGoods" icon="plus-round">添加新商品</i-Button>-->
|
||||
<!-- </i-Col>-->
|
||||
<i-Col span="2" offset="2">
|
||||
<i-Button type="primary" @click="submit">提交</i-Button>
|
||||
</i-Col>
|
||||
<i-Col span="2" offset="1">
|
||||
<i-Button type="error" @click="clear">清空所有属性</i-Button>
|
||||
</i-Col>
|
||||
</Row>
|
||||
</Form-Item>
|
||||
</template>
|
||||
</i-Form>
|
||||
<Spin fix v-show="submiting == true">保存中...</Spin>
|
||||
</div>
|
||||
<script>
|
||||
var _vm ;
|
||||
mpFrame.start(function(Vue){
|
||||
new Vue({
|
||||
data () {
|
||||
return {
|
||||
hidden:false,
|
||||
submiting :false,
|
||||
items: <?php echo $result && isset($result['attr']) && !empty($result['attr']) ? json_encode($result['attr']) : 'false'; ?> || [
|
||||
{
|
||||
value: '',
|
||||
detailValue:'',
|
||||
attrHidden:false,
|
||||
detail:[]
|
||||
}
|
||||
],
|
||||
attrs:<?php echo $result && isset($result['value']) && !empty($result['value']) ? json_encode($result['value']) : '[]'; ?>
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
items:{
|
||||
handler:function(){
|
||||
// this.attrs = [];
|
||||
},
|
||||
deep:true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
attrHiddenBool(item){
|
||||
if(item.value == ''){
|
||||
$eb.message('error','请填写规则名称');
|
||||
}else{
|
||||
item.attrHidden = true;
|
||||
}
|
||||
},
|
||||
hiddenBool(){
|
||||
this.hidden = true;
|
||||
},
|
||||
handleAdd () {
|
||||
if(!this.checkAttr())return ;
|
||||
this.items.push({
|
||||
value: '',
|
||||
detailValue:'',
|
||||
attrHidden:false,
|
||||
detail:[]
|
||||
});
|
||||
},
|
||||
checkAttr(){
|
||||
var bool = true;
|
||||
this.items.map(function(item){
|
||||
if(!bool) return;
|
||||
if(!item.value){
|
||||
$eb.message('error','请填写规则名称');
|
||||
bool = false;
|
||||
}else if(!item.detail.length){
|
||||
$eb.message('error','请设置规则属性');
|
||||
bool = false;
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
},
|
||||
attrAdd (item) {
|
||||
if(!item.detailValue) return false;
|
||||
item.detail.push(item.detailValue);
|
||||
item.detailValue = '';
|
||||
},
|
||||
handleRemove (index) {
|
||||
if(this.items.length > 1)
|
||||
this.items.splice(index,1);
|
||||
else
|
||||
$eb.message('error','请设置至少一个规则');
|
||||
},
|
||||
attrRemove(item,k){
|
||||
if(1==item.detail.length){
|
||||
$eb.message('error','请设置至少一个属性');
|
||||
return false;
|
||||
}
|
||||
item.detail.splice(k,1);
|
||||
},
|
||||
removeGoods(index){
|
||||
this.attrs.splice(index,1);
|
||||
},
|
||||
checkGoods(){
|
||||
var bool = true;
|
||||
this.attrs.map(function(attr){
|
||||
if(!bool) return ;
|
||||
if(!Object.keys(attr.detail).length){
|
||||
$eb.message('error','请选择至少一个属性');
|
||||
bool = false;
|
||||
}else if(attr.price != parseFloat(attr.price) || attr.price < 0){
|
||||
$eb.message('error','请输入正确的商品价格');
|
||||
bool = false;
|
||||
}else if(attr.sales != parseInt(attr.sales) || attr.sales < 0){
|
||||
$eb.message('error','请输入正确的商品库存');
|
||||
bool = false;
|
||||
}
|
||||
});
|
||||
return bool;
|
||||
},
|
||||
addGoods(type){
|
||||
var that = this;
|
||||
if(this.attrs.length){
|
||||
if(!this.checkGoods())return ;
|
||||
}
|
||||
$eb.axios.post("{:Url('is_format_attr',array('id'=>$id))}",{items:this.items,attrs:this.attrs}).then(function(res){
|
||||
if(res.data.code == 200){
|
||||
that.attrs = res.data.data
|
||||
}else{
|
||||
$eb.message('error',res.data.msg);
|
||||
}
|
||||
}).catch(function(err){
|
||||
if(res.data.code == 200){
|
||||
that.attrs = res.data.data
|
||||
}else{
|
||||
$eb.message('error',res.data.msg);
|
||||
}
|
||||
})
|
||||
// if(type === true){
|
||||
// this.attrs = [{
|
||||
// detail:{},
|
||||
// price:'',
|
||||
// sales:'',
|
||||
// pic:'{$image}'
|
||||
// }];
|
||||
// }else{
|
||||
// this.attrs.push({
|
||||
// detail:{},
|
||||
// price:'',
|
||||
// sales:'',
|
||||
// pic:'{$image}'
|
||||
// });
|
||||
// }
|
||||
},
|
||||
openPic(src){
|
||||
$eb.openImage(src);
|
||||
},
|
||||
uploadSuccess(data){
|
||||
return function(response, file, fileList){
|
||||
if(response.code == 200){
|
||||
data.pic = response.data.url;
|
||||
}else{
|
||||
$eb.message('error',response.data.msg || '图片上传失败!');
|
||||
}
|
||||
}
|
||||
},
|
||||
uploadError(error, file, fileList){
|
||||
$eb.message('error',error);
|
||||
},
|
||||
uploadFormatError(file, fileList){
|
||||
$eb.message('error','图片格式错误');
|
||||
},
|
||||
submit(){
|
||||
var that = this;
|
||||
that.submiting = true;
|
||||
if(!this.checkAttr() || !this.checkGoods()) return ;
|
||||
for(let attr in that.attrs){
|
||||
that.attrs[attr].check = false;
|
||||
}
|
||||
$eb.axios.post("{:Url('set_attr',array('id'=>$id))}",{items:this.items,attrs:this.attrs}).then(function(res){
|
||||
that.submiting = false;
|
||||
if(res.status == 200 && res.data.code == 200){
|
||||
$eb.message('success',res.data.msg || '编辑成功!');
|
||||
$eb.closeModalFrame(window.name);
|
||||
}else{
|
||||
$eb.message('error',res.data.msg || '请求失败!');
|
||||
}
|
||||
}).catch(function(err){
|
||||
$eb.message('error',err);
|
||||
})
|
||||
},
|
||||
clear(){
|
||||
var that = this;
|
||||
requirejs(['sweetalert'], function (swel) {
|
||||
swel({
|
||||
title: "您确定要清空产品属性吗",
|
||||
text: "删除后将无法恢复,请谨慎操作!",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "是的,我要清空!",
|
||||
cancelButtonText: "让我再考虑一下…",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false
|
||||
}).then(function () {
|
||||
$eb.axios.post("{:Url('clear_attr',array('id'=>$id))}", {
|
||||
items: that.items,
|
||||
attrs: that.attrs
|
||||
}).then(function (res) {
|
||||
if (res.status == 200 && res.data.code == 200) {
|
||||
$eb.message('success', res.data.msg || '清空成功!');
|
||||
window.location.reload();
|
||||
} else {
|
||||
$eb.message('error', res.data.msg || '清空失败!');
|
||||
}
|
||||
}).catch(function (err) {
|
||||
$eb.message('error', err);
|
||||
})
|
||||
}).catch(console.log);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted (){
|
||||
_vm = this;
|
||||
var resultAdmin = <?php echo $result && isset($result['attr']) && !empty($result['attr']) ? json_encode($result['attr']) : 'false'; ?>;
|
||||
if(resultAdmin) this.hidden = true;
|
||||
}
|
||||
}).$mount(document.getElementById('store-attr'));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
@ -1,213 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="m-b m-l">
|
||||
<form action="" class="form-inline">
|
||||
<div class="input-group datepicker">
|
||||
<input style="width: 188px;" type="text" id="data" class="input-sm form-control" name="data" value="{$where.data}" placeholder="请选择日期" >
|
||||
</div>
|
||||
<select name="status" aria-controls="editable" class="form-control input-sm">
|
||||
<option value="">全部</option>
|
||||
<option value="1" {eq name="where.status" value="1"}selected="selected"{/eq}>进行中</option>
|
||||
<option value="2" {eq name="where.status" value="2"}selected="selected"{/eq}>已完成</option>
|
||||
<option value="3" {eq name="where.status" value="3"}selected="selected"{/eq}>未完成</option>
|
||||
</select>
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" id="no_export" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i> 搜索</button>
|
||||
</span>
|
||||
</div>
|
||||
<script>
|
||||
$('#export').on('click',function(){
|
||||
$('input[name=export]').val(1);
|
||||
});
|
||||
$('#no_export').on('click',function(){
|
||||
$('input[name=export]').val(0);
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">开团团长</th>
|
||||
<th class="text-center">开团时间</th>
|
||||
<th class="text-center">拼团产品</th>
|
||||
<th class="text-center">几人团</th>
|
||||
<th class="text-center">几人参加</th>
|
||||
<th class="text-center">结束时间</th>
|
||||
<th class="text-center">状态</th>
|
||||
<th class="text-center">操作</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.nickname}/{$vo.uid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.add_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.title}/{$vo.cid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.people}人
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.count_people}人
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.stop_time|date='Y-m-d H:i:s',###}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['status'] eq 1"}
|
||||
<span style="color: #00a0e9">进行中</span>
|
||||
{elseif condition="$vo['status'] eq 2"}
|
||||
<span style="color: #e933ce">已完成</span>
|
||||
{elseif condition="$vo['status'] eq 3"}
|
||||
<span style="color: #2725e9">未完成</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<p><button class="btn btn-default btn-xs btn-outline" type="button" onclick="$eb.createModalFrame('查看详情','{:Url('order_pink',array('id'=>$vo['id']))}')"><i class="fa fa-newspaper-o"></i>查看详情</button></p>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{include file="public/inner_page"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
$('.btn-danger').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改收货状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
$('.offline_btn').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url'),pay_price =_this.data('pay');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改已支付'+pay_price+'元的状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
|
||||
$('.add_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id');
|
||||
$eb.$alert('textarea',{},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
$('.save_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id'),make=_this.data('make');
|
||||
$eb.$alert('textarea',{title:'请修改内容',value:make},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '清空',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
$("#data").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("#data").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,246 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script type="text/javascript" src="{__PLUG_PATH}jquery.downCount.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row layui-col-space15" id="app">
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">拼团产品搜索</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
|
||||
目前拥有{$countCombination}个拼团产品
|
||||
</div>
|
||||
<form class="layui-form">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">搜 索:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="store_name" lay-verify="store_name" style="width: 100%" autocomplete="off" placeholder="请输入产品名称,关键字,编号" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">拼团状态:</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="is_show" lay-verify="is_show">
|
||||
<option value="">全部</option>
|
||||
<option value="1">开启</option>
|
||||
<option value="0">关闭</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">
|
||||
<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="search" style="font-size:14px;line-height: 9px;">
|
||||
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索</button>
|
||||
<button lay-submit="export" lay-filter="export" class="layui-btn layui-btn-primary layui-btn-sm">
|
||||
<i class="layui-icon layui-icon-delete layuiadmin-button-btn" ></i> Excel导出</button>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
总展现量
|
||||
<span class="layui-badge layuiadmin-badge">量</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<p class="layuiadmin-big-font">{$statistics.browseCount}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
访客人数
|
||||
<span class="layui-badge layuiadmin-badge">人</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<p class="layuiadmin-big-font">{$statistics.visitCount}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
参与人数
|
||||
<span class="layui-badge layuiadmin-badge">人</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<p class="layuiadmin-big-font">{$statistics.partakeCount}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-sm6 layui-col-md3">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">
|
||||
成团数量
|
||||
<span class="layui-badge layuiadmin-badge">量</span>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<p class="layuiadmin-big-font">{$statistics.pinkCount}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end-->
|
||||
<div class="layui-col-md12">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">拼团产品列表</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-hide" id="combinationList" lay-filter="combinationList"></table>
|
||||
<script type="text/html" id="status">
|
||||
<input type='checkbox' name='status' lay-skin='switch' value="{{d.id}}" lay-filter='status' lay-text='开启|关闭' {{ d.is_show == 1 ? 'checked' : '' }}>
|
||||
</script>
|
||||
<script type="text/html" id="stopTime">
|
||||
<div class="count-time-{{d.id}}" data-time="{{d._stop_time}}">
|
||||
<span class="days">00</span>
|
||||
:
|
||||
<span class="hours">00</span>
|
||||
:
|
||||
<span class="minutes">00</span>
|
||||
:
|
||||
<span class="seconds">00</span>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)"><i class="layui-icon layui-icon-edit"></i>操作</button>
|
||||
<ul class="layui-nav-child layui-anim layui-anim-upbit">
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.title}}-编辑','{:Url('edit')}?id={{d.id}}')"><i class="layui-icon layui-icon-edit"></i> 编辑</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" onclick="$eb.createModalFrame('{{d.title}}-编辑内容','{:Url('edit_content')}?id={{d.id}}')"><i class="fa fa-pencil"></i> 编辑内容</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="delstor" lay-event='delstor'><i class="layui-icon layui-icon-delete"></i> 删除</a>
|
||||
</li>
|
||||
</ul>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script src="{__ADMIN_PATH}js/layuiList.js"></script>
|
||||
<script>
|
||||
layList.form.render();
|
||||
layList.tableList('combinationList',"{:Url('get_combination_list')}",function () {
|
||||
return [
|
||||
{field: 'id', title: '编号', sort: true,event:'id'},
|
||||
{field: 'image', title: '拼团图片',width:'10%',templet: '<p><img src="{{d.image}}" alt="{{d.title}}" class="open_image" data-image="{{d.image}}"></p>'},
|
||||
{field: 'title', title: '拼团名称',width:'10%'},
|
||||
{field: 'ot_price', title: '原价'},
|
||||
{field: 'price', title: '拼团价'},
|
||||
{field: 'stock', title: '库存'},
|
||||
{field: 'people', title: '拼团人数',templet: '<span>【{{d.people}}】人</span>'},
|
||||
{field: 'count_people_browse', title: '访客人数'},
|
||||
{field: 'browse', title: '展现量'},
|
||||
{field: 'count_people_all', title: '参与人数',templet: '<span>【{{d.count_people_all}}】人</span>'},
|
||||
{field: 'count_people_pink', title: '成团数量',templet: '<span>【{{d.count_people_pink}}】团</span>'},
|
||||
{field: 'browse', title: '浏览量'},
|
||||
{field: 'is_show', title: '产品状态',templet:"#status"},
|
||||
{field: '_stop_time', title: '结束时间',width:'8%',toolbar: '#stopTime'},
|
||||
{fixed: 'right', title: '操作', align: 'center', toolbar: '#barDemo'}
|
||||
]
|
||||
});
|
||||
layList.search('search',function(where){
|
||||
layList.reload(where);
|
||||
setTime();
|
||||
});
|
||||
layList.search('export',function(where){
|
||||
location.href=layList.U({c:'ump.store_combination',a:'save_excel',q:{
|
||||
is_show:where.is_show,
|
||||
store_name:where.store_name
|
||||
}});
|
||||
})
|
||||
setTime();
|
||||
window.$combinationId = <?php echo json_encode($combinationId);?>;
|
||||
function setTime() {
|
||||
setTimeout(function () {
|
||||
$.each($combinationId,function (index,item) {
|
||||
if($('.count-time-'+item).attr('data-time')!=undefined){
|
||||
$('.count-time-'+item).downCount({
|
||||
date: $('.count-time-'+item).attr('data-time'),
|
||||
offset: +8
|
||||
});
|
||||
}
|
||||
})
|
||||
},3000);
|
||||
}
|
||||
layList.switch('status',function (odj,value,name) {
|
||||
if (odj.elem.checked == true) {
|
||||
layList.baseGet(layList.Url({
|
||||
c: 'ump.store_combination',
|
||||
a: 'set_combination_status',
|
||||
p: {status: 1, id: value}
|
||||
}), function (res) {
|
||||
layList.msg(res.msg);
|
||||
});
|
||||
} else {
|
||||
layList.baseGet(layList.Url({
|
||||
c: 'ump.store_combination',
|
||||
a: 'set_combination_status',
|
||||
p: {status: 0, id: value}
|
||||
}), function (res) {
|
||||
layList.msg(res.msg);
|
||||
});
|
||||
}
|
||||
})
|
||||
layList.tool(function (event,data,obj) {
|
||||
switch (event) {
|
||||
case 'delstor':
|
||||
var url=layList.U({c:'ump.store_combination',a:'delete',q:{id:data.id}});
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
obj.del();
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '删除失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
})
|
||||
break;
|
||||
}
|
||||
})
|
||||
$(document).click(function (e) {
|
||||
$('.layui-nav-child').hide();
|
||||
})
|
||||
function dropdown(that){
|
||||
var oEvent = arguments.callee.caller.arguments[0] || event;
|
||||
oEvent.stopPropagation();
|
||||
var offset = $(that).offset();
|
||||
var top=offset.top-$(window).scrollTop();
|
||||
var index = $(that).parents('tr').data('index');
|
||||
$('.layui-nav-child').each(function (key) {
|
||||
if (key != index) {
|
||||
$(this).hide();
|
||||
}
|
||||
})
|
||||
if($(document).height() < top+$(that).next('ul').height()){
|
||||
$(that).next('ul').css({
|
||||
'padding': 10,
|
||||
'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2),
|
||||
'min-width': 'inherit',
|
||||
'position': 'absolute'
|
||||
}).toggle();
|
||||
}else{
|
||||
$(that).next('ul').css({
|
||||
'padding': 10,
|
||||
'top':$(that).parent('td').height() / 2 + $(that).height(),
|
||||
'min-width': 'inherit',
|
||||
'position': 'absolute'
|
||||
}).toggle();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{/block}
|
||||
@ -1,173 +0,0 @@
|
||||
{extend name="public/container"}
|
||||
{block name="head_top"}
|
||||
<script src="{__PLUG_PATH}sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="{__PLUG_PATH}moment.js"></script>
|
||||
<link rel="stylesheet" href="{__PLUG_PATH}daterangepicker/daterangepicker.css">
|
||||
<script src="{__PLUG_PATH}daterangepicker/daterangepicker.js"></script>
|
||||
{/block}
|
||||
{block name="content"}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow:visible">
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">编号</th>
|
||||
<th class="text-center">用户名称</th>
|
||||
<th class="text-center">用户头像</th>
|
||||
<th class="text-center">订单编号</th>
|
||||
<th class="text-center">金额</th>
|
||||
<th class="text-center">订单状态</th>
|
||||
</thead>
|
||||
<tbody class="">
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{$vo.id}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{$vo.nickname}/{$vo.uid}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<img class="open_image" style="max-width: 80px;" data-image="{$vo.avatar}" src="{$vo.avatar}" alt="{$vo.nickname}">
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<a href="{:Url('order.storeOrder/index')}?real_name={$vo.order_id}">{$vo.order_id}</a>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
¥{$vo.price}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if condition="$vo['is_refund']"}
|
||||
已退款
|
||||
{else/}
|
||||
未退款
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script>
|
||||
$(".open_image").on('click',function (e) {
|
||||
var image = $(this).data('image');
|
||||
$eb.openImage(image);
|
||||
})
|
||||
$('.btn-danger').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改收货状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
$('.offline_btn').on('click',function (e) {
|
||||
window.t = $(this);
|
||||
var _this = $(this),url =_this.data('url'),pay_price =_this.data('pay');
|
||||
$eb.$swal('delete',function(){
|
||||
$eb.axios.get(url).then(function(res){
|
||||
if(res.status == 200 && res.data.code == 200) {
|
||||
$eb.$swal('success',res.data.msg);
|
||||
}else
|
||||
return Promise.reject(res.data.msg || '收货失败')
|
||||
}).catch(function(err){
|
||||
$eb.$swal('error',err);
|
||||
});
|
||||
},{'title':'您确定要修改已支付'+pay_price+'元的状态吗?','text':'修改后将无法恢复,请谨慎操作!','confirm':'是的,我要修改'})
|
||||
})
|
||||
|
||||
$('.add_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id');
|
||||
$eb.$alert('textarea',{},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
$('.save_mark').on('click',function (e) {
|
||||
var _this = $(this),url =_this.data('url'),id=_this.data('id'),make=_this.data('make');
|
||||
$eb.$alert('textarea',{title:'请修改内容',value:make},function (result) {
|
||||
if(result){
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:'remark='+result+'&id='+id,
|
||||
type:'post',
|
||||
dataType:'json',
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
if(res.code == 200) {
|
||||
$eb.$swal('success',res.msg);
|
||||
}else
|
||||
$eb.$swal('error',res.msg);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$eb.$swal('error','请输入要备注的内容');
|
||||
}
|
||||
});
|
||||
})
|
||||
var dateInput =$('.datepicker');
|
||||
dateInput.daterangepicker({
|
||||
autoUpdateInput: false,
|
||||
"opens": "center",
|
||||
"drops": "down",
|
||||
"ranges": {
|
||||
'今天': [moment(), moment().add(1, 'days')],
|
||||
'昨天': [moment().subtract(1, 'days'), moment()],
|
||||
'上周': [moment().subtract(6, 'days'), moment()],
|
||||
'前30天': [moment().subtract(29, 'days'), moment()],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
||||
},
|
||||
"locale" : {
|
||||
applyLabel : '确定',
|
||||
cancelLabel : '清空',
|
||||
fromLabel : '起始时间',
|
||||
toLabel : '结束时间',
|
||||
format : 'YYYY/MM/DD',
|
||||
customRangeLabel : '自定义',
|
||||
daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
|
||||
monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',
|
||||
'七月', '八月', '九月', '十月', '十一月', '十二月' ],
|
||||
firstDay : 1
|
||||
}
|
||||
});
|
||||
dateInput.on('cancel.daterangepicker', function(ev, picker) {
|
||||
$("#data").val('');
|
||||
});
|
||||
dateInput.on('apply.daterangepicker', function(ev, picker) {
|
||||
$("#data").val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
Loading…
x
Reference in New Issue
Block a user