pc后台,课程功能,位置相关

退款全流程
课程增加类型(单选
修复一些bug
This commit is contained in:
15090180611 2024-12-06 18:47:05 +08:00
parent 7c64ed4438
commit 4ca1a1b348
59 changed files with 2430 additions and 190 deletions

View File

@ -59,6 +59,7 @@ class Index extends Backend
$this->view->assign("statusList", $this->shopModel->getStatusList());
$this->view->assign("typeList", $this->shopModel->getTypeList());
$this->view->assign("shop_backend_url", config("site.shop_backend_url"));
$this->getCity();
}
@ -514,11 +515,12 @@ class Index extends Backend
exception('商家信息删除失败');
}
db()->commit();
$this->success('删除成功');
}catch (\Exception $e){
db()->rollback();
$this->error($e->getMessage());
}
$this->success('删除成功');
}
$this->error(__('You have no permission'));
}

View File

@ -61,7 +61,7 @@ class ClassesLib extends Backend
$this->view->assign("specStatusList", (new \app\admin\model\school\classes\ClassesSpec)->getStatusList());
$this->getCity();
}

View File

@ -0,0 +1,37 @@
<?php
namespace app\admin\controller\school\classes;
use app\common\controller\Backend;
/**
* 机构课程类型
*
* @icon fa fa-circle-o
*/
class Type extends Backend
{
/**
* Type模型对象
* @var \app\admin\model\school\classes\Type
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\Type;
$this->view->assign("statusList", $this->model->getStatusList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}

View File

@ -105,4 +105,40 @@ class Order extends Backend
return $this->view->fetch();
}
/**发起售后
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function after_sales($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$classes_order = $params["id"];
$reason = $params["reason"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$remark = "总后台管理员帮忙下售后单";
$model->afterSales($classes_order,$reason,$remark,'admin',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("执行成功");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign('row', $row);
return $this->view->fetch();
}
}

View File

@ -77,4 +77,160 @@ class ServiceOrder extends Backend
return $this->view->fetch();
}
/**用户确认
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function user_confirmation($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$order_no = $params["order_no"];
$reject_images = $params["reject_images"];
$reject_reason = $params["reject_reason"];
$status = $params["status"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->userConfirmation($order_no,$status,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("已完成审核");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**机构确认
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function shop_confirmation($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$order_no = $params["order_no"];
$reject_images = $params["reject_images"];
$reject_reason = $params["reject_reason"];
$price = $params["price"];
$status = $params["status"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->shopConfirmation($order_no,$status,$price,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("已完成审核");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**系统确认
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function admin_confirmation($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$order_no = $params["order_no"];
$reject_images = $params["reject_images"];
$reject_reason = $params["reject_reason"];
$status = $params["status"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->adminConfirmation($order_no,$status,$reject_reason,$reject_images,0,true,'admin',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("已完成审核");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**
* 后台核销
* @return string
* @throws \think\Exception
* @throws \think\db\exception\BindParamException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function cancel($ids = ''){
$param = $this->request->param();
if($this->request->isPost()){
try{
if(isset($param['ids']))$ids = $param['ids'];
//设置模拟资格
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->cancel($ids,0,true,'admin',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success('取消成功!');
}
$row = $this->model->get($ids);
$this->view->assign('vo', $row);
return $this->view->fetch();
}
}

View File

@ -0,0 +1,14 @@
<?php
return [
'Name' => '分类名',
'Status' => '状态',
'Status 1' => '上架',
'Set status to 1'=> '设为上架',
'Status 2' => '下架',
'Set status to 2'=> '设为下架',
'Weigh' => '权重',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间'
];

View File

@ -0,0 +1,59 @@
<?php
namespace app\admin\model\school\classes;
use think\Model;
use traits\model\SoftDelete;
class Type extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_type';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes;
use think\Validate;
class Type extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -142,11 +142,11 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="shop[address_city]" value="" type="text">
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="shop[address_city]" value="{$q_address_city}" type="text">
</div>
<input type="hidden" id="province" name="shop[province]" value="" >
<input type="hidden" id="city" name="shop[city]" value="" >
<input type="hidden" id="district" name="shop[district]" value="" >
<input type="hidden" id="province" name="shop[province]" value="{$q_province_code}" >
<input type="hidden" id="city" name="shop[city]" value="{$q_city_code}" >
<input type="hidden" id="district" name="shop[district]" value="{q_area_code}" >
</div>
</div>
<div class="form-group">

View File

@ -153,11 +153,11 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="shop[address_city]" value="{$shop.address_city}" type="text">
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="shop[address_city]" value="{$shop.address_city ? $shop.address_city:$q_address_city}" type="text">
</div>
<input type="hidden" id="province" name="shop[province]" value="{$shop.province}" >
<input type="hidden" id="city" name="shop[city]" value="{$shop.city}" >
<input type="hidden" id="district" name="shop[district]" value="{$shop.district}" >
<input type="hidden" id="province" name="shop[province]" value="{$shop.province ? $shop.province:$q_province_code}" >
<input type="hidden" id="city" name="shop[city]" value="{$shop.city ? $shop.city:$q_city_code}" >
<input type="hidden" id="district" name="shop[district]" value="{$shop.district ? $shop.district:$q_area_code}" >
</div>
</div>
<div class="form-group">

View File

@ -65,6 +65,26 @@
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_type" data-rule="required" data-source="school/classes/type/index" class="form-control selectpage" name="row[classes_type]" type="text" value="">
<span style="color: red">
(没找到类型则点击按钮创建类型后重新下拉框选类型)
<a href="javascript:;" data-url="school/classes/type/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/type/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Self_label_tag')}:</label>
<div class="col-xs-12 col-sm-8">
@ -149,11 +169,11 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('课时规格信息')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('所有课时信息')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table table-responsive fieldlist" data-name="row[spec]" data-template="testtpl" data-tag="tr">
<tr>
<td>规格</td>
<td>每节课</td>
<td>开始结束时间</td>
<td>限定人数</td>
<!-- <td>权重</td>-->
@ -216,11 +236,11 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="{$q_address_city}" type="text">
</div>
<input type="hidden" id="province" name="row[province]" value="" >
<input type="hidden" id="city" name="row[city]" value="" >
<input type="hidden" id="district" name="row[district]" value="" >
<input type="hidden" id="province" name="row[province]" value="{$q_province_code}" >
<input type="hidden" id="city" name="row[city]" value="{$q_city_code}" >
<input type="hidden" id="district" name="row[district]" value="{$q_area_code}" >
</div>
</div>
<div class="form-group">

View File

@ -103,6 +103,25 @@
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_type" data-source="school/classes/type/index" class="form-control selectpage" name="row[classes_type]" type="text" value="{$row.classes_type|htmlentities}">
<span style="color: red">
(没找到类型则点击按钮创建类型后重新下拉框选类型)
<a href="javascript:;" data-url="school/classes/type/index" class="btn btn-success btn-changeuser {:$auth->check('school/classes/type/index')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Self_label_tag')}:</label>
<div class="col-xs-12 col-sm-8">
@ -188,11 +207,11 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('课时规格信息')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('所有课时信息')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table table-responsive fieldlist" data-name="row[spec]" data-template="testtpl" data-tag="tr">
<tr>
<td>规格</td>
<td>每节课</td>
<td>开始结束时间</td>
<td>限定人数</td>
<!-- <td>权重</td>-->
@ -311,13 +330,13 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50">{$row.notice}</textarea>
</div>
</div>
<!-- <div class="form-group">-->

View File

@ -0,0 +1,21 @@
<form id="after_sales-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[id]" type="hidden" value="{$row.id}">
<fieldset>
<legend><h4>帮用户售后需填写原因!</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('售后原因')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reason" class="form-control" data-rule="required" name="row[reason]" type="text" value="">
</div>
</div>
</fieldset>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="after_sales" data-type="after_sales" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -0,0 +1,61 @@
<form id="admin_confirmation-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[order_no]" type="hidden" value="{$row.order_no}">
<fieldset>
<legend><h4>平台处理退款到账(如果同意退款,提交后需等待微信退款回调,回调成功才会更新订单状态!)</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('处理结果')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="yes"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
</fieldset>
<div id="status_yes" >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('机构确定的退款金额')} :</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" disabled step="0.01" name="row[price]" type="number" value="{$row.c_price|htmlentities}">
<!-- <span style="color: red">( 当前订单损耗比为 {$row.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.auto_price|htmlentities} | 退款金额不能超过订单应退全额 )</span>-->
</div>
</div>
</div>
<div id="status_no" style="display: none;">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-reject_images" class="form-control" size="50" name="row[reject_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-reject_images" class="btn btn-danger faupload" data-input-id="c-reject_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-reject_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-reject_images" class="btn btn-primary fachoose" data-input-id="c-reject_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-reject_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-reject_images"></ul>
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="admin_confirmation" data-type="admin_confirmation" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -17,25 +17,25 @@
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!-- <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
<!-- -->
<div class="dropdown btn-group {:$auth->check('school/classes/order/service_order/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<!-- <div class="dropdown btn-group {:$auth->check('school/classes/order/service_order/multi')?'':'hide'}">-->
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!-- <ul class="dropdown-menu text-left" role="menu">-->
<!-- {foreach name="statusList" item="vo"}-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>-->
<!-- {/foreach}-->
<!-- </ul>-->
<!-- </div>-->
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/order/service_order/recyclebin')?'':'hide'}" href="school/classes/order/service_order/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/order/service_order/edit')}"
data-operate-del="{:$auth->check('school/classes/order/service_order/del')}"
data-operate-edit="0"
data-operate-del="0"
width="100%">
</table>
</div>

View File

@ -0,0 +1,61 @@
<form id="shop_confirmation-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[order_no]" type="hidden" value="{$row.order_no}">
<fieldset>
<legend><h4>帮机构售后处理</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('处理结果')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="yes"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
</fieldset>
<div id="status_yes" >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('同意退款金额')}(默认损耗后额度):</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.auto_recommend_price|htmlentities}">
<span style="color: red">( 当前订单损耗比为 {$row.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.auto_price|htmlentities} | 退款金额不能超过订单应退全额 )</span>
</div>
</div>
</div>
<div id="status_no" style="display: none;">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-reject_images" class="form-control" size="50" name="row[reject_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-reject_images" class="btn btn-danger faupload" data-input-id="c-reject_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-reject_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-reject_images" class="btn btn-primary fachoose" data-input-id="c-reject_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-reject_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-reject_images"></ul>
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="shop_confirmation" data-type="shop_confirmation" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -0,0 +1,61 @@
<form id="user_confirmation-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[order_no]" type="hidden" value="{$row.order_no}">
<fieldset>
<legend><h4>帮用户售后处理</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('处理结果')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="yes"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
</fieldset>
<div id="status_yes" >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('机构退款金额')} :</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" disabled step="0.01" name="row[price]" type="number" value="{$row.tbc_price|htmlentities}">
<!-- <span style="color: red">( 当前订单损耗比为 {$row.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.auto_price|htmlentities} | 退款金额不能超过订单应退全额 )</span>-->
</div>
</div>
</div>
<div id="status_no" style="display: none;">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-reject_images" class="form-control" size="50" name="row[reject_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-reject_images" class="btn btn-danger faupload" data-input-id="c-reject_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-reject_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-reject_images" class="btn btn-primary fachoose" data-input-id="c-reject_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-reject_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-reject_images"></ul>
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="user_confirmation" data-type="user_confirmation" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -17,25 +17,25 @@
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order_log/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order_log/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!-- <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
<!-- -->
<div class="dropdown btn-group {:$auth->check('school/classes/order/service_order_log/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<!-- <div class="dropdown btn-group {:$auth->check('school/classes/order/service_order_log/multi')?'':'hide'}">-->
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!-- <ul class="dropdown-menu text-left" role="menu">-->
<!-- {foreach name="statusList" item="vo"}-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>-->
<!-- {/foreach}-->
<!-- </ul>-->
<!-- </div>-->
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/order/service_order_log/edit')}"
data-operate-del="{:$auth->check('school/classes/order/service_order_log/del')}"
data-operate-edit="0"
data-operate-del="0"
width="100%">
</table>
</div>

View File

@ -0,0 +1,33 @@
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,33 @@
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
{/foreach}
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/type/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/type/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/type/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/type/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/type/recyclebin')?'':'hide'}" href="school/classes/type/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/type/edit')}"
data-operate-del="{:$auth->check('school/classes/type/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/type/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/type/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/type/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/type/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/type/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/type/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/type/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/type/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/type/restore')}"
data-operate-destroy="{:$auth->check('school/classes/type/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -25,7 +25,7 @@ class Index extends Api
/**
* 各种协议文章
* @ApiSummary(about_us 关于夜校 site.entry_agreement 入驻协议)
* @ApiSummary(about_us 关于夜校 entry_agreement 入驻协议 privacy 隐私协议)
* @ApiMethod (GET)
*/
public function agreement()
@ -33,7 +33,8 @@ class Index extends Api
$data = [
'about_us' => config("site.about_us"),
'entry_agreement' => config("site.entry_agreement")
'entry_agreement' => config("site.entry_agreement"),
"privacy"=> config("site.privacy"),
];
$this->success(__('查询成功'), $data);

View File

@ -5,6 +5,7 @@ namespace app\api\controller\school;
use app\common\model\school\classes\Cate;
use app\common\model\school\classes\ClassesLib;
use app\common\model\school\classes\Label;
use app\common\model\school\classes\Type;
use app\common\model\school\SearchCity;
use think\Cache;
use think\Log;
@ -14,7 +15,7 @@ use think\Log;
*/
class Classes extends Base
{
protected $noNeedLogin = ["detail",'people','spec','label_list','cate_list',"index","classes_list"];
protected $noNeedLogin = ["detail",'people','spec','label_list','cate_list',"index","classes_list","type_list"];
protected $noNeedRight = '*';
protected $model = null;
@ -67,7 +68,9 @@ class Classes extends Base
$label = Label::showList(1, 20,"");
$this->success('获取成功', compact('distance_config_data',"distance_city","cate" ,"label" ));
$type = config("site.classes_type");
$this->success('获取成功', compact('distance_config_data',"distance_city","cate" ,"label" ,"type"));
}
@ -213,6 +216,43 @@ class Classes extends Base
}
/**
* @ApiTitle( 课程类型列表)
* @ApiSummary(课程类型列表)
* @ApiRoute(/api/school/classes/type_list)
* @ApiMethod(GET)
* @ApiParams(name = "keywords", type = "string",required=false,description = "搜索关键字")
* @ApiParams(name = "page", type = "string",required=true,description = "页数")
* @ApiParams(name = "limit", type = "string",required=true,description = "条数")
* @ApiReturn({
*
*})
*/
public function type_list()
{
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$page = $this->request->get('page/d', 0); //页数
$limit = $this->request->get('limit/d', 0); //条数
$keywords = $this->request->get('keywords/s', ''); //搜索关键字
// $type = $this->request->get('type/s', ''); //筛选学员和教练单
try{
//当前申请状态
$res = Type::showList($page, $limit,$keywords);
// if($user_id =='670153'){
// file_put_contents("ceshi66.txt",(new AppointmentOrder())->getLastSql());
// }
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success('查询成功', $res);
}
/**
* @ApiTitle( 课程标签列表)
* @ApiSummary(课程标签列表)
@ -269,6 +309,7 @@ class Classes extends Base
* @ApiParams(name = "classes_cate_ids", type = "string",required=false,description = "平台课程分类ids")
* @ApiParams(name = "classes_label_ids", type = "string",required=false,description = "平台课程热门标签ids")
* @ApiParams(name = "self_label_tag", type = "string",required=false,description = "机构特色标签")
* @ApiParams(name = "classes_type", type = "string",required=false,description = "平台课程类型")
* @ApiParams(name = "keyword", type = "string",required=false,description = "关键字搜索")
* @ApiParams(name = "type", type = "string",required=false,description = "地点类型:out=户外,in=室内")
* @ApiParams(name = "address_type", type = "string",required=false,description = "地址类型:1=按机构,2=独立位置")
@ -312,6 +353,8 @@ class Classes extends Base
$params["address_type"] = $this->request->get('address_type/s', ''); //机构店铺id
$params["province"] = $this->request->get('province/s', ''); //机构店铺id
$params["classes_type"] = $this->request->get('classes_type/s', ''); //机构店铺id
$params["city"] = $this->request->get('city/s', ''); //机构店铺id
$params["district"] = $this->request->get('district/s', ''); //机构店铺id
$params["status"] = $this->request->get('status/s', ''); //机构店铺id

View File

@ -4,6 +4,8 @@ namespace app\common\controller;
use app\admin\controller\famysql\Field;
use app\admin\library\Auth;
use app\common\library\Virtual;
use app\common\model\school\Area;
use Monolog\Handler\IFTTTHandler;
use think\Config;
use think\Controller;
@ -187,6 +189,21 @@ class Backend extends Controller
protected function getCity(){
$city_data = Virtual::getNowCity();
//全部参数前缀加 "q_" 塞入模板
$this->assign('q_city', $city_data['city']);
$this->assign('q_area', $city_data['area']);
$this->assign('q_province', $city_data['province']);
$this->assign('q_city_code', $city_data['city_code']);
$this->assign('q_area_code', $city_data['area_code']);
$this->assign('q_province_code', $city_data['province_code']);
$this->assign('q_address_city', $city_data['address_city']);
}
/**
* 引入后台控制器的traits
*/
@ -307,6 +324,9 @@ class Backend extends Controller
//渲染管理员对象
$this->assign('admin', Session::get('admin'));
$this->checkAssemblyParameters();
// $this->view->assign("selfhotList", $this->model->getSelfhotList());
}
/**

View File

@ -3,6 +3,7 @@
namespace app\common\controller;
use app\admin\controller\famysql\Field;
use app\common\library\Virtual;
use app\common\model\dyqc\ManystoreShop;
use app\manystore\library\Auth;
use app\common\model\ManystoreConfig;
@ -193,6 +194,19 @@ class ManystoreBase extends Controller
}
protected function getCity(){
$city_data = Virtual::getNowCity();
//全部参数前缀加 "q_" 塞入模板
$this->assign('q_city', $city_data['city']);
$this->assign('q_area', $city_data['area']);
$this->assign('q_province', $city_data['province']);
$this->assign('q_city_code', $city_data['city_code']);
$this->assign('q_area_code', $city_data['area_code']);
$this->assign('q_province_code', $city_data['province_code']);
$this->assign('q_address_city', $city_data['address_city']);
}
/**
* 引入后台控制器的traits
@ -202,7 +216,7 @@ class ManystoreBase extends Controller
public function _initialize()
{
//移除HTML标签
$this->request->filter('trim,strip_tags,htmlspecialchars');
$this->request->filter('trim');
$modulename = $this->request->module();
$controllername = Loader::parseName($this->request->controller());
$actionname = strtolower($this->request->action());

View File

@ -2,6 +2,7 @@
namespace app\common\library;
use app\common\model\school\Area;
use app\common\model\school\classes\VirtualHead;
use app\common\model\school\classes\VirtualUser;
@ -122,5 +123,41 @@ class Virtual
}
public static function getNowCity(){
$address_city = config("site.the_city");
//按/符号分割
$the_city = explode("/",$address_city);
//初始化省市区变量
$province = $city = $area = null;
$province_code = $city_code = $area_code = 0;
//只分割出一个为省
//只分割出两个为省和市
//分割出三个为省、市、县
if(count($the_city)==1){
$province = $the_city[0];
}elseif(count($the_city)==2){
$province = $the_city[0];
$city = $the_city[1];
}elseif(count($the_city)==3){
$province = $the_city[0];
$city = $the_city[1];
$area = $the_city[2];
}
//省市区分别模糊查询区域编码表获取编码
if($province) $province_code = Area::where("level",1)->where("name","like","%$province%")->value("id");
if($city) $city_code = Area::where("level",2)->where( "pid",$province_code)->where("name","like","%$city%")->value("id");
if($area) $area_code = Area::where("level",3)->where( "pid",$city_code)->where("name","like","%$area%")->value("id");
return [
"address_city"=>$address_city,
"province"=>$province,
"city"=>$city,
"area"=>$area,
"province_code"=>$province_code,
"city_code"=>$city_code,
"area_code"=>$area_code
];
}
}

View File

@ -730,6 +730,11 @@ $user_unpaid_order = $user_paid_order =null;
$selfetch = $selfetch->whereRaw(" {$a}self_label_tag REGEXP '({$self_label_tag})'");
}
if (isset($classes_type) && $classes_type) {
$classes_type = implode("|",explode(',',$classes_type));
$selfetch = $selfetch->whereRaw(" {$a}classes_type REGEXP '({$classes_type})'");
}
@ -891,7 +896,7 @@ $user_unpaid_order = $user_paid_order =null;
$classes_lib = self::get($classes_lib_id);
if($classes_lib){
//如果课程虚拟参与者字300-2000随机
$classes_lib->virtual_people = mt_rand(300, 2000);
$classes_lib->virtual_people = mt_rand(10, 50);
//如果课程虚拟报名者字段
$classes_lib->virtual_num = 0;
$classes_lib->save();

View File

@ -0,0 +1,109 @@
<?php
namespace app\common\model\school\classes;
use app\common\model\BaseModel;
use think\Model;
use traits\model\SoftDelete;
class Type extends BaseModel
{
use SoftDelete;
// 表名
protected $name = 'school_classes_type';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
/**得到基础条件
* @param $status
* @param null $model
* @param string $alisa
*/
public static function getBaseWhere($whereData = [], $model = null, $alisa = '',$with = false)
{
if (!$model) {
$model = new static;
if ($alisa&&!$with) $model = $model->alias($alisa);
}
if ($alisa) $alisa = $alisa . '.';
$tableFields = (new static)->getTableFields();
foreach ($tableFields as $fields)
{
if(in_array($fields, ['status']))continue;
// if (isset($whereData[$fields]) && $whereData[$fields]) $model = $model->where("{$alisa}{$fields}", '=', $whereData[$fields]);
if (isset($whereData[$fields]) && $whereData[$fields]){
if(is_array($whereData[$fields])){
$model = $model->where("{$alisa}{$fields}", $whereData[$fields][0], $whereData[$fields][1]);
}else{
$model = $model->where("{$alisa}{$fields}", '=', $whereData[$fields]);
}
}
}
if (isset($whereData['status'])) $model = $model->where("{$alisa}status", 'in', $whereData['status']);
if (isset($whereData['keywords'])&&$whereData['keywords']) $model = $model->where("{$alisa}id|{$alisa}name", 'Like', "%{$whereData['keywords']}%");
if (isset($whereData['time'])&&$whereData['time']){
$model = $model->time($whereData['time']);
}
return $model;
}
public static function showList($page, $limit,$keywords){
$field = ['*'];
$sort = "weigh desc,id desc";
$serch_where = ['keywords'=>$keywords,"status"=>"1"];
return (new self)->getBaseList($serch_where, $page, $limit,$sort,$field);
}
}

View File

@ -603,7 +603,7 @@ class ServiceOrder extends BaseModel
$classes_order->before_status = '0';
$classes_order->server_status = '0';//refund_status
$classes_order->reason = '';
$classes_order->classes_service_order_id = 0;
// $classes_order->classes_service_order_id = 0; //先不清楚上次售后记录
$classes_order->save();
return $classes_order;
}
@ -1055,6 +1055,22 @@ class ServiceOrder extends BaseModel
/**更新课程订单售后成功
* @param $order
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function orderSuccess($classes_order){
if(is_numeric($classes_order)||is_string($classes_order))$classes_order = Order::where('order_no|id',$classes_order)->find();
$classes_order->status = '6';//refund_status
$classes_order->server_status = '6';//refund_status
$classes_order->refundtime = time();
$classes_order->save();
return $classes_order;
}
/**用户售后提交确认信息
@ -1373,7 +1389,9 @@ class ServiceOrder extends BaseModel
'refund_desc' => $refund_desc ?: "课程[{$detail["title"]}]订单[ID:{$classesorder['id']}]退款{$refund_money}已到账户",
]);
$config = Service::getConfig('wechat');
$config = Service::getConfig('wechat',[],$classesorder->platform);
$notify_url = request()->domain() . '/api/school/pay/notifyr/payment/' . $classesorder->pay_type . '/platform/' . $classesorder->platform;
@ -1399,7 +1417,7 @@ class ServiceOrder extends BaseModel
if($trans){
self::rollbackTrans();
}
throw new \Exception($e->getMessage());
throw new \Exception($e->getMessage().$e->getFile().$e->getLine());
}
return $res;
}
@ -1425,10 +1443,13 @@ class ServiceOrder extends BaseModel
//事务逻辑
//更新订单状态为同意
$order = self::updateAdminConfirmationOrder($order);
self::orderSuccess($order["classes_order_id"]);
//插入订单日志
ServiceOrderLog::log($order['id'],"[系统操作]课程订单售后系统退款已原路退回", 'admin', 0);
//执行课时数更新
$res1 = order::statisticsAndUpdateClassesNumber($order['classes_order_id']);
//调用订单取消事件
$data = ['serviceorder' => $order,"user_id"=>$order['user_id'],"oper_type"=>'admin',"oper_id"=>0];

View File

@ -29,6 +29,7 @@ class Profile extends ManystoreBase
$this->view->assign('typeList',$shop_info->getTypeList());
$this->view->assign('shop_info',$shop_info);
$this->getCity();
return $this->view->fetch();
}

View File

@ -60,7 +60,7 @@ class ClassesLib extends ManystoreBase
$this->view->assign("specStatusList", (new \app\manystore\model\school\classes\ClassesSpec)->getStatusList());
$this->getCity();
}
public function import()
@ -298,6 +298,9 @@ class ClassesLib extends ManystoreBase
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
$this->model->validateFailException(true)->validate($validate);
}
$this->update_check($params,$row=null);
$result = false;
Db::startTrans();
@ -433,6 +436,9 @@ class ClassesLib extends ManystoreBase
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
if ($params) {
$params = $this->preExcludeFields($params);

View File

@ -0,0 +1,40 @@
<?php
namespace app\manystore\controller\school\classes;
use app\common\controller\ManystoreBase;
/**
* 机构课程类型
*
* @icon fa fa-circle-o
*/
class Type extends ManystoreBase
{
/**
* Type模型对象
* @var \app\manystore\model\school\classes\Type
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\Type;
$this->view->assign("statusList", $this->model->getStatusList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}

View File

@ -80,4 +80,152 @@ class ServiceOrder extends ManystoreBase
return $this->view->fetch();
}
/**用户确认
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function user_confirmation($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$order_no = $params["order_no"];
$reject_images = $params["reject_images"];
$reject_reason = $params["reject_reason"];
$status = $params["status"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->userConfirmation($order_no,$status,$reject_reason,$reject_images,0,true,'shop',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("已完成审核");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**机构确认
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function shop_confirmation($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$order_no = $params["order_no"];
$reject_images = $params["reject_images"];
$reject_reason = $params["reject_reason"];
$price = $params["price"];
$status = $params["status"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->shopConfirmation($order_no,$status,$price,$reject_reason,$reject_images,0,true,'shop',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("已完成审核");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**系统确认
* @return string
* @throws \think\Exception
* @throws \think\exception\DbException
*/
public function admin_confirmation($ids = ""){
if($this->request->isPost())
{
try{
$params = $this->request->post("row/a");
$order_no = $params["order_no"];
$reject_images = $params["reject_images"];
$reject_reason = $params["reject_reason"];
$status = $params["status"];
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->adminConfirmation($order_no,$status,$reject_reason,$reject_images,0,true,'shop',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success("已完成审核");
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
// $row = $this->model->get($param['ids']);
$this->view->assign("statusList", ["yes"=>"同意", "no"=>"拒绝"]);
$this->view->assign('row', $row);
return $this->view->fetch();
}
/**
* 后台核销
* @return string
* @throws \think\Exception
* @throws \think\db\exception\BindParamException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public function cancel($ids = ''){
$param = $this->request->param();
if($this->request->isPost()){
try{
if(isset($param['ids']))$ids = $param['ids'];
//设置模拟资格
$model = (new \app\common\model\school\classes\order\ServiceOrder());
$model->cancel($ids,0,true,'shop',$this->auth->id,true);
}catch (\Exception $e){
$this->error($e->getMessage());
}
$this->success('取消成功!');
}
$row = $this->model->get($ids);
$this->view->assign('vo', $row);
return $this->view->fetch();
}
}

View File

@ -35,7 +35,8 @@ return [
'C_price' => '售后已确认退款金额',
'Real_refundprice' => '实际退款金额',
'Sub_refundprice' => '剩余未退金额',
'Platform' => '退款平台:miniapp=微信小程序',
'Platform' => '退款平台',
'Platform miniapp' => '微信小程序',
'Pay_type' => '退款方式',
'Pay_type yue' => '余额',
'Pay_type wechat' => '微信',

View File

@ -0,0 +1,12 @@
<?php
return [
'Name' => '分类名',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Weigh' => '权重',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间'
];

View File

@ -0,0 +1,57 @@
<?php
namespace app\manystore\model\school\classes;
use think\Model;
use traits\model\SoftDelete;
class Type extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_type';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes;
use think\Validate;
class Type extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -142,11 +142,11 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="{$q_address_city}" type="text">
</div>
<input type="hidden" id="province" name="row[province]" value="" >
<input type="hidden" id="city" name="row[city]" value="" >
<input type="hidden" id="district" name="row[district]" value="" >
<input type="hidden" id="province" name="row[province]" value="{$q_province_code}" >
<input type="hidden" id="city" name="row[city]" value="{$q_city_code}" >
<input type="hidden" id="district" name="row[district]" value="{$q_area_code}" >
</div>
</div>
<div class="form-group">

View File

@ -44,6 +44,22 @@
<input id="c-classes_label_ids" data-rule="required" data-source="school/classes/label/index" data-multiple="true" class="form-control selectpage" name="row[classes_label_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_type" data-rule="required" data-source="school/classes/type/index" class="form-control selectpage" name="row[classes_type]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Self_label_tag')}:</label>
<div class="col-xs-12 col-sm-8">
@ -126,11 +142,11 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('课时规格信息')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('所有课时信息')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table table-responsive fieldlist" data-name="row[spec]" data-template="testtpl" data-tag="tr">
<tr>
<td>规格</td>
<td>每节课</td>
<td>开始结束时间</td>
<td>限定人数</td>
<!-- <td>权重</td>-->
@ -197,11 +213,11 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="{$q_address_city}" type="text">
</div>
<input type="hidden" id="province" name="row[province]" value="" >
<input type="hidden" id="city" name="row[city]" value="" >
<input type="hidden" id="district" name="row[district]" value="" >
<input type="hidden" id="province" name="row[province]" value="{$q_province_code}" >
<input type="hidden" id="city" name="row[city]" value="{$q_city_code}" >
<input type="hidden" id="district" name="row[district]" value="{$q_area_code}" >
</div>
</div>
<div class="form-group">

View File

@ -85,6 +85,18 @@
<input id="c-classes_label_ids" data-rule="required" data-source="school/classes/label/index" data-multiple="true" class="form-control selectpage" name="row[classes_label_ids]" type="text" value="{$row.classes_label_ids|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('类型')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_type" data-source="school/classes/type/index" class="form-control selectpage" name="row[classes_type]" type="text" value="{$row.classes_type|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Self_label_tag')}:</label>
<div class="col-xs-12 col-sm-8">
@ -167,11 +179,11 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('课时规格信息')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('所有课时信息')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table table-responsive fieldlist" data-name="row[spec]" data-template="testtpl" data-tag="tr">
<tr>
<td>规格</td>
<td>每节课</td>
<td>开始结束时间</td>
<td>限定人数</td>
<!-- <td>权重</td>-->
@ -291,13 +303,13 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
<textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50">{$row.notice}</textarea>
</div>
</div>
<!-- <div class="form-group">-->

View File

@ -0,0 +1,61 @@
<form id="admin_confirmation-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[order_no]" type="hidden" value="{$row.order_no}">
<fieldset>
<legend><h4>平台处理退款到账</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('处理结果')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="yes"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
</fieldset>
<div id="status_yes" >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('机构确定的退款金额')} :</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" disabled step="0.01" name="row[price]" type="number" value="{$row.c_price|htmlentities}">
<!-- <span style="color: red">( 当前订单损耗比为 {$row.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.auto_price|htmlentities} | 退款金额不能超过订单应退全额 )</span>-->
</div>
</div>
</div>
<div id="status_no" style="display: none;">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-reject_images" class="form-control" size="50" name="row[reject_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-reject_images" class="btn btn-danger faupload" data-input-id="c-reject_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-reject_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-reject_images" class="btn btn-primary fachoose" data-input-id="c-reject_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-reject_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-reject_images"></ul>
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="admin_confirmation" data-type="admin_confirmation" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -17,23 +17,23 @@
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!-- <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
<div class="dropdown btn-group {:$auth->check('school/classes/order/service_order/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
<!-- <div class="dropdown btn-group {:$auth->check('school/classes/order/service_order/multi')?'':'hide'}">-->
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!-- <ul class="dropdown-menu text-left" role="menu">-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
<!-- </ul>-->
<!-- </div>-->
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/order/service_order/recyclebin')?'':'hide'}" href="school/classes/order/service_order/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
<!-- <a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/order/service_order/recyclebin')?'':'hide'}" href="school/classes/order/service_order/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>-->
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/order/service_order/edit')}"
data-operate-del="{:$auth->check('school/classes/order/service_order/del')}"
data-operate-edit="0"
data-operate-del="0"
width="100%">
</table>
</div>

View File

@ -0,0 +1,61 @@
<form id="shop_confirmation-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[order_no]" type="hidden" value="{$row.order_no}">
<fieldset>
<legend><h4>帮机构售后处理</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('处理结果')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="yes"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
</fieldset>
<div id="status_yes" >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('同意退款金额')}(默认损耗后额度):</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.auto_recommend_price|htmlentities}">
<span style="color: red">( 当前订单损耗比为 {$row.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.auto_price|htmlentities} | 退款金额不能超过订单应退全额 )</span>
</div>
</div>
</div>
<div id="status_no" style="display: none;">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-reject_images" class="form-control" size="50" name="row[reject_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-reject_images" class="btn btn-danger faupload" data-input-id="c-reject_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-reject_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-reject_images" class="btn btn-primary fachoose" data-input-id="c-reject_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-reject_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-reject_images"></ul>
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="shop_confirmation" data-type="shop_confirmation" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -0,0 +1,61 @@
<form id="user_confirmation-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<input name="row[order_no]" type="hidden" value="{$row.order_no}">
<fieldset>
<legend><h4>帮用户售后处理</h4></legend>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('处理结果')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="yes"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
</fieldset>
<div id="status_yes" >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('机构退款金额')} :</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" disabled step="0.01" name="row[price]" type="number" value="{$row.tbc_price|htmlentities}">
<!-- <span style="color: red">( 当前订单损耗比为 {$row.loss_proportion|htmlentities}% | 忽略损耗应退全额为 {$row.auto_price|htmlentities} | 退款金额不能超过订单应退全额 )</span>-->
</div>
</div>
</div>
<div id="status_no" style="display: none;">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reject_images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-reject_images" class="form-control" size="50" name="row[reject_images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-reject_images" class="btn btn-danger faupload" data-input-id="c-reject_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-reject_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-reject_images" class="btn btn-primary fachoose" data-input-id="c-reject_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-reject_images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-reject_images"></ul>
</div>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="button" id="user_confirmation" data-type="user_confirmation" class="btn btn-success btn-embossed">确认提交结果</button>
</div>
</div>
</form>

View File

@ -17,23 +17,23 @@
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order_log/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/service_order_log/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!-- <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<!-- <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/service_order_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
<div class="dropdown btn-group {:$auth->check('school/classes/order/service_order_log/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
<!-- <div class="dropdown btn-group {:$auth->check('school/classes/order/service_order_log/multi')?'':'hide'}">-->
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!-- <ul class="dropdown-menu text-left" role="menu">-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
<!-- </ul>-->
<!-- </div>-->
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/order/service_order_log/edit')}"
data-operate-del="{:$auth->check('school/classes/order/service_order_log/del')}"
data-operate-edit="0"
data-operate-del="0"
width="100%">
</table>
</div>

View File

@ -0,0 +1,34 @@
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,34 @@
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,44 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
{/foreach}
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/type/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/type/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/type/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/type/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/type/recyclebin')?'':'hide'}" href="school/classes/type/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/type/edit')}"
data-operate-del="{:$auth->check('school/classes/type/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/type/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/type/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/type/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/type/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/type/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/type/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/type/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/type/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/type/restore')}"
data-operate-destroy="{:$auth->check('school/classes/type/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -176,6 +176,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
{field: 'id', title: 'ID'},
{field: 'shop.name', title: __('申请姓名|机构名'), operate: 'LIKE'},
{field: 'shop.logo', title: __('Logo'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'username', title: __('Username')},
{field: 'nickname', title: __('Nickname')},
@ -191,8 +194,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// {field: 'user_id', title: __('申请姓名|机构名'), operate: 'LIKE'},
{field: 'shop.name', title: __('申请姓名|机构名'), operate: 'LIKE'},
{field: 'shop.logo', title: __('Logo'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'shop.image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'shop.address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'shop.province', title: __('Province'),visible:false},
@ -235,9 +236,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
$("#district").val(district);
}
$(this).blur();
});
// $(".city-select-tab a").removeClass('active');
$('[data-count="district"]').tab('show');
$(document).on('click', '.btn-changeuser', function (event) {
var url = $(this).attr('data-url');

View File

@ -10,6 +10,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
edit_url: 'school/classes/order/order/edit',
del_url: 'school/classes/order/order/del',
cancel_url: 'school/classes/order/order/cancel',
after_sales_url: 'school/classes/order/order/after_sales',
multi_url: 'school/classes/order/order/multi',
import_url: 'school/classes/order/order/import',
table: 'school_classes_order',
@ -64,6 +65,37 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return row.paytime;
}
},
{
name: 'after_sales',
text: __('平台发起售后'),
title: __('平台发起售后'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-sign-in',
url: $.fn.bootstrapTable.defaults.extend.after_sales_url,
callback: function (data) {
},
visible: function (row) {
return row.status == '3';
}
},
{
name: 'service_order',
text: __('售后单情况'),
title: __('售后单情况'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: service_order_url,
callback: function (data) {
},
visible: function (row) {
return row.classes_service_order_id;
}
},
{
name: 'order',
text: __('课时预约记录'),
@ -255,6 +287,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
edit: function () {
Controller.api.bindevent();
},
after_sales: function(){
$("#after_sales").on('click', function() {
$("#after_sales-form").attr("action",'school/classes/order/order/after_sales').submit();
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
@ -275,5 +314,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return 'school/classes/hourorder/order/index?classes_order_id='+row.id + '&classes_lib_id='+row.classes_lib_id;
}
var service_order_url = function (row,dom) {
return 'school/classes/order/service_order/index?id='+row.classes_service_order_id;
}
return Controller;
});

View File

@ -6,10 +6,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Table.api.init({
extend: {
index_url: 'school/classes/order/service_order/index' + location.search,
add_url: 'school/classes/order/service_order/add',
add_url: 'school/classes/order/service_order/add'+ location.search,
edit_url: 'school/classes/order/service_order/edit',
del_url: 'school/classes/order/service_order/del',
multi_url: 'school/classes/order/service_order/multi',
cancel_url: 'school/classes/order/service_order/cancel',
user_confirmation_url: 'school/classes/order/service_order/user_confirmation',
shop_confirmation_url: 'school/classes/order/service_order/shop_confirmation',
admin_confirmation_url: 'school/classes/order/service_order/admin_confirmation',
import_url: 'school/classes/order/service_order/import',
table: 'school_classes_service_order',
}
@ -27,17 +33,144 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
columns: [
[
{checkbox: true},
{field: 'operate', title: __('Operate'), table: table , buttons: [
{name: 'cancel',
text: '帮用户取消售后',
icon: 'fa fa-sign-in',
classname: 'btn btn-xs btn-warning btn-magic btn-ajax',
url: $.fn.bootstrapTable.defaults.extend.cancel_url,
confirm: '帮用户取消售后',
success: function (data, ret) {
Layer.alert(ret.msg );
$(".btn-refresh").trigger("click");
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
},
visible: function (row) {
//显示条件 只能待入住订单
if(row.status == "1" && row.service_stauts == "1"){
return true;
}
return false;
}},
{
name: 'user_confirmation',
text: __('帮用户确认价格'),
title: __('帮用户确认价格'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-sign-in',
url: $.fn.bootstrapTable.defaults.extend.user_confirmation_url,
callback: function (data) {
},
visible: function (row) {
return row.status == '4' && row.service_stauts == "4";
}
},
{
name: 'shop_confirmation',
text: __('帮机构处理售后'),
title: __('帮机构处理售后'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-sign-in',
url: $.fn.bootstrapTable.defaults.extend.shop_confirmation_url,
callback: function (data) {
},
visible: function (row) {
return row.status == '1' && row.service_stauts == "1";
}
},
{
name: 'admin_confirmation',
text: __('平台处理退款'),
title: __('平台处理退款'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-sign-in',
url: $.fn.bootstrapTable.defaults.extend.admin_confirmation_url,
callback: function (data) {
},
visible: function (row) {
return row.status == '4' && row.service_stauts == "7";
}
},
{
name: 'order_log',
text: __('售后日志'),
title: __('售后日志'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: order_log_url,
callback: function (data) {
},
// visible: function (row) {
// return row.status == '2'||row.status == '3';
// }
},
{
name: 'order_detail',
text: __('课程信息'),
title: __('课程信息'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: order_detail_url,
callback: function (data) {
},
// visible: function (row) {
// return row.paytime;
// }
},
//
// {name: 'unsetmockauth',
// text: '取消加圈资格',
// icon: 'fa fa-sign-in',
// classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
// url: $.fn.bootstrapTable.defaults.extend.unsetmockauth_url,
// confirm: '(分车版本)确认取消用户加圈资格!',
// success: function (data, ret) {
// Layer.alert(ret.msg );
// $(".btn-refresh").trigger("click");
// },
// error: function (data, ret) {
// Layer.alert(ret.msg);
// return false;
// },
// visible: function (row) {
// //显示条件 只能待入住订单
// if((row.status == 2 || row.status == 3) && row.mock_type == "base" && row.add_mock_status == "2"){
// return true;
// }
// return false;
// }},
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
{field: 'id', title: __('Id')},
{field: 'order_no', title: __('Order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"4":__('Status 4'),"7":__('Status 7'),"-3":__('Status -3')}, formatter: Table.api.formatter.status},
{field: 'detail.title', title: __('Detail.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'detail.headimage', title: __('Detail.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname',visible:false, title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'reason', title: __('Reason'), operate: 'LIKE'},
{field: 'classes_order_id', title: __('Classes_order_id')},
{field: 'user_id', title: __('User_id')},
{field: 'classes_order_detail_id', title: __('Classes_order_detail_id')},
{field: 'classes_lib_id', title: __('Classes_lib_id')},
{field: 'manystore_id', title: __('Manystore_id')},
{field: 'shop_id', title: __('Shop_id')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"4":__('Status 4'),"7":__('Status 7'),"-3":__('Status -3')}, formatter: Table.api.formatter.status},
{field: 'classes_order_id',visible:false, title: __('Classes_order_id')},
{field: 'user_id',visible:false, title: __('User_id')},
{field: 'classes_order_detail_id',visible:false, title: __('Classes_order_detail_id')},
{field: 'classes_lib_id',visible:false, title: __('Classes_lib_id')},
{field: 'manystore_id',visible:false, title: __('Manystore_id')},
{field: 'shop_id',visible:false, title: __('Shop_id')},
{field: 'service_stauts', title: __('Service_stauts'), searchList: {"1":__('Service_stauts 1'),"4":__('Service_stauts 4'),"7":__('Service_stauts 7'),"10":__('Service_stauts 10'),"-3":__('Service_stauts -3')}, formatter: Table.api.formatter.normal},
{field: 'sales_type', title: __('Sales_type'), searchList: {"-3":__('Sales_type -3'),"1":__('Sales_type 1'),"4":__('Sales_type 4'),"7":__('Sales_type 7'),"10":__('Sales_type 10')}, formatter: Table.api.formatter.normal},
{field: 'reject_reason', title: __('Reject_reason'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
@ -49,6 +182,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'c_price', title: __('C_price'), operate:'BETWEEN'},
{field: 'real_refundprice', title: __('Real_refundprice'), operate:'BETWEEN'},
{field: 'sub_refundprice', title: __('Sub_refundprice'), operate:'BETWEEN'},
{field: 'platform', title: __('Platform'), searchList: {"miniapp":__('Platform miniapp')}, formatter: Table.api.formatter.normal},
{field: 'pay_type', title: __('Pay_type'), searchList: {"yue":__('Pay_type yue'),"wechat":__('Pay_type wechat')}, formatter: Table.api.formatter.normal},
{field: 'refundtime', title: __('Refundtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
@ -58,20 +193,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'checkouttime', title: __('Checkouttime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'classesorder.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classesorder.pay_no', title: __('Order.pay_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'detail.title', title: __('Detail.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'detail.headimage', title: __('Detail.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'lib.title', title: __('Lib.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'lib.headimage', title: __('Lib.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'manystore.nickname', title: __('Manystore.nickname'), operate: 'LIKE'},
{field: 'shop.name', title: __('Shop.name'), operate: 'LIKE'},
{field: 'shop.logo', title: __('Shop.logo'), operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'classesorder.order_no',visible:false, title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classesorder.pay_no',visible:false, title: __('Order.pay_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'lib.title', title: __('Lib.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'lib.headimage', title: __('Lib.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'manystore.nickname',visible:false, title: __('Manystore.nickname'), operate: 'LIKE'},
{field: 'shop.name',visible:false, title: __('Shop.name'), operate: 'LIKE'},
{field: 'shop.logo',visible:false, title: __('Shop.logo'), operate: 'LIKE'},
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
@ -145,11 +274,73 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
edit: function () {
Controller.api.bindevent();
},
admin_confirmation: function(){
$("#admin_confirmation").on('click', function() {
$("#admin_confirmation-form").attr("action",'school/classes/order/service_order/admin_confirmation').submit();
});
Controller.api.bindevent();
},
user_confirmation: function(){
$("#user_confirmation").on('click', function() {
$("#user_confirmation-form").attr("action",'school/classes/order/service_order/user_confirmation').submit();
});
Controller.api.bindevent();
},
shop_confirmation: function(){
$("#shop_confirmation").on('click', function() {
$("#shop_confirmation-form").attr("action",'school/classes/order/service_order/shop_confirmation').submit();
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
generrate.listen();
Form.api.bindevent($("form[role=form]"));
}
}
};
var order_log_url = function (row,dom) {
return 'school/classes/order/service_order_log/index?classes_service_order_id='+row.id;
}
var order_detail_url = function (row,dom) {
return 'school/classes/order/order_detail/index?id='+row.classes_order_detail_id;
}
var generrate = {
listen:function () {
this.offlineListen();
// this.priceListen();
},
offlineListen:function () {
var that = this;
// console.log($("input:radio[name='row[address_type]']").val())
// this.setOfflineType($("input:radio[name='row[address_type]']").val());
$("input:radio[name='row[status]']").change(function (){
that.setOfflineType($(this).val());
});
},
setOfflineType:function (val) {
switch (val) {
case 'yes':
$('#status_no').hide();
$('#status_yes').show();
break;
case 'no':
$('#status_yes').hide();
$('#status_no').show();
break;
}
}
}
return Controller;
});

View File

@ -28,13 +28,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'classes_service_order_id', title: __('Classes_service_order_id')},
{field: 'classes_order_id', title: __('Classes_order_id')},
{field: 'user_id', title: __('User_id')},
{field: 'classes_order_detail_id', title: __('Classes_order_detail_id')},
{field: 'classes_lib_id', title: __('Classes_lib_id')},
{field: 'manystore_id', title: __('Manystore_id')},
{field: 'shop_id', title: __('Shop_id')},
{field: 'classes_service_order_id',visible:false, title: __('Classes_service_order_id')},
{field: 'classes_order_id',visible:false, title: __('Classes_order_id')},
{field: 'user_id',visible:false, title: __('User_id')},
{field: 'classes_order_detail_id',visible:false, title: __('Classes_order_detail_id')},
{field: 'classes_lib_id',visible:false, title: __('Classes_lib_id')},
{field: 'manystore_id',visible:false, title: __('Manystore_id')},
{field: 'shop_id',visible:false, title: __('Shop_id')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"4":__('Status 4'),"7":__('Status 7'),"-3":__('Status -3')}, formatter: Table.api.formatter.status},
{field: 'service_stauts', title: __('Service_stauts'), searchList: {"1":__('Service_stauts 1'),"4":__('Service_stauts 4'),"7":__('Service_stauts 7'),"10":__('Service_stauts 10'),"-3":__('Service_stauts -3')}, formatter: Table.api.formatter.normal},
{field: 'sales_type', title: __('Sales_type'), searchList: {"-3":__('Sales_type -3'),"1":__('Sales_type 1'),"4":__('Sales_type 4'),"7":__('Sales_type 7'),"10":__('Sales_type 10')}, formatter: Table.api.formatter.normal},
@ -43,16 +43,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'oper_type', title: __('Oper_type'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'serviceorder.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classesorder.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classesorder.pay_no', title: __('Order.pay_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'detail.title', title: __('Detail.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
// {field: 'serviceorder.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'classesorder.order_no', title: __('Order.order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'classesorder.pay_no', title: __('Order.pay_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'user.nickname',visible:false, title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname',visible:false, title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile',visible:false, title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar',visible:false, title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
// {field: 'detail.title', title: __('Detail.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
@ -72,5 +72,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
}
};
return Controller;
});

View File

@ -0,0 +1,116 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'school/classes/type/index' + location.search,
add_url: 'school/classes/type/add',
edit_url: 'school/classes/type/edit',
del_url: 'school/classes/type/del',
multi_url: 'school/classes/type/multi',
import_url: 'school/classes/type/import',
table: 'school_classes_type',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'weigh',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
{field: 'weigh', title: __('Weigh'), operate: false},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
recyclebin: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
'dragsort_url': ''
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: 'school/classes/type/recyclebin' + location.search,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), align: 'left'},
{
field: 'deletetime',
title: __('Deletetime'),
operate: 'RANGE',
addclass: 'datetimerange',
formatter: Table.api.formatter.datetime
},
{
field: 'operate',
width: '140px',
title: __('Operate'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'Restore',
text: __('Restore'),
classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
icon: 'fa fa-rotate-left',
url: 'school/classes/type/restore',
refresh: true
},
{
name: 'Destroy',
text: __('Destroy'),
classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
icon: 'fa fa-times',
url: 'school/classes/type/destroy',
refresh: true
}
],
formatter: Table.api.formatter.operate
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@ -65,7 +65,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
},
{
name: 'service_order',
text: __('售后单情况'),
title: __('售后单情况'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: service_order_url,
callback: function (data) {
},
visible: function (row) {
return row.classes_service_order_id;
}
},
{
name: 'order',
@ -276,6 +289,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return 'school/classes/hourorder/order/index?classes_order_id='+row.id + '&classes_lib_id='+row.classes_lib_id;
}
var service_order_url = function (row,dom) {
return 'school/classes/order/service_order/index?classes_order_id='+row.id;
}
return Controller;
});

View File

@ -6,10 +6,15 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
Table.api.init({
extend: {
index_url: 'school/classes/order/service_order/index' + location.search,
add_url: 'school/classes/order/service_order/add',
add_url: 'school/classes/order/service_order/add'+ location.search,
edit_url: 'school/classes/order/service_order/edit',
del_url: 'school/classes/order/service_order/del',
multi_url: 'school/classes/order/service_order/multi',
cancel_url: 'school/classes/order/service_order/cancel',
user_confirmation_url: 'school/classes/order/service_order/user_confirmation',
shop_confirmation_url: 'school/classes/order/service_order/shop_confirmation',
admin_confirmation_url: 'school/classes/order/service_order/admin_confirmation',
import_url: 'school/classes/order/service_order/import',
table: 'school_classes_service_order',
}
@ -25,19 +30,102 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
columns: [
[
{checkbox: true},
{field: 'operate', title: __('Operate'), table: table , buttons: [
{
name: 'shop_confirmation',
text: __('机构处理售后'),
title: __('机构处理售后'),
classname: 'btn btn-xs btn-danger btn-dialog',
icon: 'fa fa-sign-in',
url: $.fn.bootstrapTable.defaults.extend.shop_confirmation_url,
callback: function (data) {
},
visible: function (row) {
return row.status == '1' && row.service_stauts == "1";
}
},
{
name: 'order_log',
text: __('售后日志'),
title: __('售后日志'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: order_log_url,
callback: function (data) {
},
// visible: function (row) {
// return row.status == '2'||row.status == '3';
// }
},
{
name: 'order_detail',
text: __('课程信息'),
title: __('课程信息'),
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: order_detail_url,
callback: function (data) {
},
// visible: function (row) {
// return row.paytime;
// }
},
//
// {name: 'unsetmockauth',
// text: '取消加圈资格',
// icon: 'fa fa-sign-in',
// classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
// url: $.fn.bootstrapTable.defaults.extend.unsetmockauth_url,
// confirm: '(分车版本)确认取消用户加圈资格!',
// success: function (data, ret) {
// Layer.alert(ret.msg );
// $(".btn-refresh").trigger("click");
// },
// error: function (data, ret) {
// Layer.alert(ret.msg);
// return false;
// },
// visible: function (row) {
// //显示条件 只能待入住订单
// if((row.status == 2 || row.status == 3) && row.mock_type == "base" && row.add_mock_status == "2"){
// return true;
// }
// return false;
// }},
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
{field: 'id', title: __('Id')},
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
{field: 'order_no', title: __('Order_no'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'schoolclassesorderdetail.title', title: __('Schoolclassesorderdetail.title'), operate: 'LIKE'},
{field: 'schoolclassesorderdetail.headimage', title: __('Schoolclassesorderdetail.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname',visible:false, title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'reason', title: __('Reason'), operate: 'LIKE'},
{field: 'classes_order_id', title: __('Classes_order_id')},
{field: 'user_id', title: __('User_id')},
{field: 'classes_order_detail_id', title: __('Classes_order_detail_id')},
{field: 'classes_lib_id', title: __('Classes_lib_id')},
{field: 'manystore_id', title: __('Manystore_id')},
{field: 'shop_id', title: __('Shop_id')},
{field: 'classes_order_id',visible:false, title: __('Classes_order_id')},
{field: 'user_id',visible:false, title: __('User_id')},
{field: 'classes_order_detail_id',visible:false, title: __('Classes_order_detail_id')},
{field: 'classes_lib_id',visible:false, title: __('Classes_lib_id')},
{field: 'manystore_id',visible:false, title: __('Manystore_id')},
{field: 'shop_id',visible:false, title: __('Shop_id')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"4":__('Status 4'),"7":__('Status 7'),"-3":__('Status -3')}, formatter: Table.api.formatter.status},
{field: 'service_stauts', title: __('Service_stauts'), searchList: {"1":__('Service_stauts 1'),"4":__('Service_stauts 4'),"7":__('Service_stauts 7'),"10":__('Service_stauts 10'),"-3":__('Service_stauts -3')}, formatter: Table.api.formatter.normal},
{field: 'sales_type', title: __('Sales_type'), searchList: {"-3":__('Sales_type -3'),"1":__('Sales_type 1'),"4":__('Sales_type 4'),"7":__('Sales_type 7'),"10":__('Sales_type 10')}, formatter: Table.api.formatter.normal},
{field: 'reject_reason', title: __('Reject_reason'), operate: 'LIKE'},
{field: 'reject_reason', title: __('Reject_reason'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'reject_images', title: __('Reject_images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'auto_price', title: __('Auto_price'), operate:'BETWEEN'},
{field: 'loss_proportion', title: __('Loss_proportion'), operate:'BETWEEN'},
@ -46,29 +134,28 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'c_price', title: __('C_price'), operate:'BETWEEN'},
{field: 'real_refundprice', title: __('Real_refundprice'), operate:'BETWEEN'},
{field: 'sub_refundprice', title: __('Sub_refundprice'), operate:'BETWEEN'},
{field: 'platform', title: __('Platform'), searchList: {"miniapp":__('Miniapp')}, formatter: Table.api.formatter.normal},
{field: 'platform', title: __('Platform'), searchList: {"miniapp":__('Platform miniapp')}, formatter: Table.api.formatter.normal},
{field: 'pay_type', title: __('Pay_type'), searchList: {"yue":__('Pay_type yue'),"wechat":__('Pay_type wechat')}, formatter: Table.api.formatter.normal},
{field: 'refundtime', title: __('Refundtime')},
{field: 'rejecttime', title: __('Rejecttime')},
{field: 'handletime', title: __('Handletime')},
{field: 'confirmtime', title: __('Confirmtime')},
{field: 'checkouttime', title: __('Checkouttime')},
{field: 'createtime', title: __('Createtime')},
{field: 'updatetime', title: __('Updatetime')},
{field: 'schoolclassesorder.order_no', title: __('Schoolclassesorder.order_no'), operate: 'LIKE'},
{field: 'schoolclassesorder.pay_no', title: __('Schoolclassesorder.pay_no'), operate: 'LIKE'},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'schoolclassesorderdetail.title', title: __('Schoolclassesorderdetail.title'), operate: 'LIKE'},
{field: 'schoolclassesorderdetail.headimage', title: __('Schoolclassesorderdetail.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'schoolclasseslib.title', title: __('Schoolclasseslib.title'), operate: 'LIKE'},
{field: 'schoolclasseslib.headimage', title: __('Schoolclasseslib.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'manystore.nickname', title: __('Manystore.nickname'), operate: 'LIKE'},
{field: 'manystoreshop.name', title: __('Manystoreshop.name'), operate: 'LIKE'},
{field: 'manystoreshop.logo', title: __('Manystoreshop.logo'), operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'refundtime', title: __('Refundtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'rejecttime', title: __('Rejecttime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'handletime', title: __('Handletime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'confirmtime', title: __('Confirmtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'checkouttime', title: __('Checkouttime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'schoolclassesorder.order_no',visible:false, title: __('Schoolclassesorder.order_no'), operate: 'LIKE'},
{field: 'schoolclassesorder.pay_no',visible:false, title: __('Schoolclassesorder.pay_no'), operate: 'LIKE'},
// {field: 'lib.title', title: __('Lib.title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
// {field: 'lib.headimage', title: __('Lib.headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'manystore.nickname',visible:false, title: __('Manystore.nickname'), operate: 'LIKE'},
{field: 'manystoreshop.name',visible:false, title: __('Manystoreshop.name'), operate: 'LIKE'},
{field: 'manystoreshop.logo',visible:false, title: __('Manystoreshop.logo'), operate: 'LIKE'},
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
@ -141,11 +228,70 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
edit: function () {
Controller.api.bindevent();
},
admin_confirmation: function(){
$("#admin_confirmation").on('click', function() {
$("#admin_confirmation-form").attr("action",'school/classes/order/service_order/admin_confirmation').submit();
});
Controller.api.bindevent();
},
user_confirmation: function(){
$("#user_confirmation").on('click', function() {
$("#user_confirmation-form").attr("action",'school/classes/order/service_order/user_confirmation').submit();
});
Controller.api.bindevent();
},
shop_confirmation: function(){
$("#shop_confirmation").on('click', function() {
$("#shop_confirmation-form").attr("action",'school/classes/order/service_order/shop_confirmation').submit();
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
generrate.listen();
Form.api.bindevent($("form[role=form]"));
}
}
};
var order_log_url = function (row,dom) {
return 'school/classes/order/service_order_log/index?classes_service_order_id='+row.id;
}
var order_detail_url = function (row,dom) {
return 'school/classes/order/order_detail/index?id='+row.classes_order_detail_id;
}
var generrate = {
listen:function () {
this.offlineListen();
// this.priceListen();
},
offlineListen:function () {
var that = this;
// console.log($("input:radio[name='row[address_type]']").val())
// this.setOfflineType($("input:radio[name='row[address_type]']").val());
$("input:radio[name='row[status]']").change(function (){
that.setOfflineType($(this).val());
});
},
setOfflineType:function (val) {
switch (val) {
case 'yes':
$('#status_no').hide();
$('#status_yes').show();
break;
case 'no':
$('#status_yes').hide();
$('#status_no').show();
break;
}
}
}
return Controller;
});

View File

@ -26,13 +26,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'classes_service_order_id', title: __('Classes_service_order_id')},
{field: 'classes_order_id', title: __('Classes_order_id')},
{field: 'user_id', title: __('User_id')},
{field: 'classes_order_detail_id', title: __('Classes_order_detail_id')},
{field: 'classes_lib_id', title: __('Classes_lib_id')},
{field: 'manystore_id', title: __('Manystore_id')},
{field: 'shop_id', title: __('Shop_id')},
{field: 'classes_service_order_id',visible:false, title: __('Classes_service_order_id')},
{field: 'classes_order_id',visible:false, title: __('Classes_order_id')},
{field: 'user_id',visible:false, title: __('User_id')},
{field: 'classes_order_detail_id',visible:false, title: __('Classes_order_detail_id')},
{field: 'classes_lib_id',visible:false, title: __('Classes_lib_id')},
{field: 'manystore_id',visible:false, title: __('Manystore_id')},
{field: 'shop_id',visible:false, title: __('Shop_id')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"4":__('Status 4'),"7":__('Status 7'),"-3":__('Status -3')}, formatter: Table.api.formatter.status},
{field: 'service_stauts', title: __('Service_stauts'), searchList: {"1":__('Service_stauts 1'),"4":__('Service_stauts 4'),"7":__('Service_stauts 7'),"10":__('Service_stauts 10'),"-3":__('Service_stauts -3')}, formatter: Table.api.formatter.normal},
{field: 'sales_type', title: __('Sales_type'), searchList: {"-3":__('Sales_type -3'),"1":__('Sales_type 1'),"4":__('Sales_type 4'),"7":__('Sales_type 7'),"10":__('Sales_type 10')}, formatter: Table.api.formatter.normal},
@ -41,16 +41,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'oper_type', title: __('Oper_type'), operate: 'LIKE'},
{field: 'createtime', title: __('Createtime')},
{field: 'updatetime', title: __('Updatetime')},
{field: 'schoolclassesserviceorder.order_no', title: __('Schoolclassesserviceorder.order_no'), operate: 'LIKE'},
{field: 'schoolclassesorder.order_no', title: __('Schoolclassesorder.order_no'), operate: 'LIKE'},
{field: 'schoolclassesorder.pay_no', title: __('Schoolclassesorder.pay_no'), operate: 'LIKE'},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'schoolclassesorderdetail.title', title: __('Schoolclassesorderdetail.title'), operate: 'LIKE'},
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'schoolclassesserviceorder.order_no',visible:false, title: __('Schoolclassesserviceorder.order_no'), operate: 'LIKE'},
{field: 'schoolclassesorder.order_no',visible:false, title: __('Schoolclassesorder.order_no'), operate: 'LIKE'},
{field: 'schoolclassesorder.pay_no',visible:false, title: __('Schoolclassesorder.pay_no'), operate: 'LIKE'},
{field: 'user.nickname',visible:false, title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname',visible:false, title: __('User.realname'), operate: 'LIKE'},
{field: 'user.mobile',visible:false, title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar',visible:false, title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
// {field: 'schoolclassesorderdetail.title', title: __('Schoolclassesorderdetail.title'), operate: 'LIKE'},
// {field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});

View File

@ -0,0 +1,115 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'school/classes/type/index' + location.search,
add_url: 'school/classes/type/add',
edit_url: 'school/classes/type/edit',
del_url: 'school/classes/type/del',
multi_url: 'school/classes/type/multi',
import_url: 'school/classes/type/import',
table: 'school_classes_type',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'weigh',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
{field: 'weigh', title: __('Weigh'), operate: false},
{field: 'createtime', title: __('Createtime')},
{field: 'updatetime', title: __('Updatetime')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
recyclebin: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
'dragsort_url': ''
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: 'school/classes/type/recyclebin' + location.search,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), align: 'left'},
{
field: 'deletetime',
title: __('Deletetime'),
operate: 'RANGE',
addclass: 'datetimerange',
formatter: Table.api.formatter.datetime
},
{
field: 'operate',
width: '130px',
title: __('Operate'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'Restore',
text: __('Restore'),
classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
icon: 'fa fa-rotate-left',
url: 'school/classes/type/restore',
refresh: true
},
{
name: 'Destroy',
text: __('Destroy'),
classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
icon: 'fa fa-times',
url: 'school/classes/type/destroy',
refresh: true
}
],
formatter: Table.api.formatter.operate
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});