Merge branch 'develop' into feature/zy
This commit is contained in:
commit
b5c32bb8ad
|
|
@ -2,232 +2,232 @@
|
|||
|
||||
return [
|
||||
[
|
||||
'name' => 'accessKeyId',
|
||||
'title' => 'AccessKey ID',
|
||||
'type' => 'string',
|
||||
'name' => 'accessKeyId',
|
||||
'title' => 'AccessKey ID',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => 'LTAI5t87F5mAkaXVKfLcmnrB',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'accessKeySecret',
|
||||
'title' => 'AccessKey Secret',
|
||||
'type' => 'string',
|
||||
'name' => 'accessKeySecret',
|
||||
'title' => 'AccessKey Secret',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => 'fk7KgdqRdJUS6Jc99TlB6mNLKorrsD',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'bucket',
|
||||
'title' => 'Bucket名称',
|
||||
'type' => 'string',
|
||||
'name' => 'bucket',
|
||||
'title' => 'Bucket名称',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'yourbucket',
|
||||
'rule' => 'required;bucket',
|
||||
'msg' => '',
|
||||
'tip' => '阿里云OSS的空间名',
|
||||
'ok' => '',
|
||||
'extend' => 'data-rule-bucket="[/^[0-9a-z_\-]{3,63}$/, \'请输入正确的Bucket名称\']"',
|
||||
'value' => 'allocatr',
|
||||
'rule' => 'required;bucket',
|
||||
'msg' => '',
|
||||
'tip' => '阿里云OSS的空间名',
|
||||
'ok' => '',
|
||||
'extend' => 'data-rule-bucket="[/^[0-9a-z_\\-]{3,63}$/, \'请输入正确的Bucket名称\']"',
|
||||
],
|
||||
[
|
||||
'name' => 'endpoint',
|
||||
'title' => 'Endpoint',
|
||||
'type' => 'string',
|
||||
'name' => 'endpoint',
|
||||
'title' => 'Endpoint',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'oss-cn-shenzhen.aliyuncs.com',
|
||||
'rule' => 'required;endpoint',
|
||||
'msg' => '',
|
||||
'tip' => '请填写从阿里云存储获取的Endpoint',
|
||||
'ok' => '',
|
||||
'extend' => 'data-rule-endpoint="[/^(?!http(s)?:\/\/).*$/, \'不能以http(s)://开头\']"',
|
||||
'value' => 'allocatr.oss-cn-hangzhou.aliyuncs.com',
|
||||
'rule' => 'required;endpoint',
|
||||
'msg' => '',
|
||||
'tip' => '请填写从阿里云存储获取的Endpoint',
|
||||
'ok' => '',
|
||||
'extend' => 'data-rule-endpoint="[/^(?!http(s)?:\\/\\/).*$/, \'不能以http(s)://开头\']"',
|
||||
],
|
||||
[
|
||||
'name' => 'cdnurl',
|
||||
'title' => 'CDN地址',
|
||||
'type' => 'string',
|
||||
'name' => 'cdnurl',
|
||||
'title' => 'CDN地址',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'https://yourbucket.oss-cn-shenzhen.aliyuncs.com',
|
||||
'rule' => 'required;cdnurl',
|
||||
'msg' => '',
|
||||
'tip' => '请填写CDN地址,必须以http(s)://开头',
|
||||
'ok' => '',
|
||||
'extend' => 'data-rule-cdnurl="[/^http(s)?:\/\/.*$/, \'必需以http(s)://开头\']"',
|
||||
'value' => 'https://allocatr.oss-cn-hangzhou.aliyuncs.com',
|
||||
'rule' => 'required;cdnurl',
|
||||
'msg' => '',
|
||||
'tip' => '请填写CDN地址,必须以http(s)://开头',
|
||||
'ok' => '',
|
||||
'extend' => 'data-rule-cdnurl="[/^http(s)?:\\/\\/.*$/, \'必需以http(s)://开头\']"',
|
||||
],
|
||||
[
|
||||
'name' => 'uploadmode',
|
||||
'title' => '上传模式',
|
||||
'type' => 'select',
|
||||
'name' => 'uploadmode',
|
||||
'title' => '上传模式',
|
||||
'type' => 'select',
|
||||
'content' => [
|
||||
'client' => '客户端直传(速度快,无备份)',
|
||||
'server' => '服务器中转(占用服务器带宽,可备份)',
|
||||
],
|
||||
'value' => 'server',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => 'client',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'serverbackup',
|
||||
'title' => '服务器中转模式备份',
|
||||
'type' => 'radio',
|
||||
'name' => 'serverbackup',
|
||||
'title' => '服务器中转模式备份',
|
||||
'type' => 'radio',
|
||||
'content' => [
|
||||
1 => '备份(附件管理将产生2条记录)',
|
||||
0 => '不备份',
|
||||
],
|
||||
'value' => '1',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '服务器中转模式下是否备份文件',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '1',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '服务器中转模式下是否备份文件',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'savekey',
|
||||
'title' => '保存文件名',
|
||||
'type' => 'string',
|
||||
'name' => 'savekey',
|
||||
'title' => '保存文件名',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '/uploads/{year}{mon}{day}/{filemd5}{.suffix}',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '/uploads/{year}{mon}{day}/{filemd5}{.suffix}',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'expire',
|
||||
'title' => '上传有效时长',
|
||||
'type' => 'string',
|
||||
'name' => 'expire',
|
||||
'title' => '上传有效时长',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '600',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '用户停留页面上传有效时长,单位秒',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '600',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '用户停留页面上传有效时长,单位秒',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'maxsize',
|
||||
'title' => '最大可上传',
|
||||
'type' => 'string',
|
||||
'name' => 'maxsize',
|
||||
'title' => '最大可上传',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '10M',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '10M',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'mimetype',
|
||||
'title' => '可上传后缀格式',
|
||||
'type' => 'string',
|
||||
'name' => 'mimetype',
|
||||
'title' => '可上传后缀格式',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => 'jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => 'jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'multiple',
|
||||
'title' => '多文件上传',
|
||||
'type' => 'bool',
|
||||
'name' => 'multiple',
|
||||
'title' => '多文件上传',
|
||||
'type' => 'bool',
|
||||
'content' => [],
|
||||
'value' => '0',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '0',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'thumbstyle',
|
||||
'title' => '缩略图样式',
|
||||
'type' => 'string',
|
||||
'name' => 'thumbstyle',
|
||||
'title' => '缩略图样式',
|
||||
'type' => 'string',
|
||||
'content' => [],
|
||||
'value' => '',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '用于后台列表缩略图样式,可使用:?x-oss-process=image/resize,m_lfit,w_120,h_90',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '用于后台列表缩略图样式,可使用:?x-oss-process=image/resize,m_lfit,w_120,h_90',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'chunking',
|
||||
'title' => '分片上传',
|
||||
'type' => 'radio',
|
||||
'name' => 'chunking',
|
||||
'title' => '分片上传',
|
||||
'type' => 'radio',
|
||||
'content' => [
|
||||
1 => '开启',
|
||||
0 => '关闭',
|
||||
],
|
||||
'value' => '0',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '0',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'chunksize',
|
||||
'title' => '分片大小',
|
||||
'type' => 'number',
|
||||
'name' => 'chunksize',
|
||||
'title' => '分片大小',
|
||||
'type' => 'number',
|
||||
'content' => [],
|
||||
'value' => '4194304',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '4194304',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'syncdelete',
|
||||
'title' => '附件删除时是否同步删除云存储文件',
|
||||
'type' => 'bool',
|
||||
'name' => 'syncdelete',
|
||||
'title' => '附件删除时是否同步删除云存储文件',
|
||||
'type' => 'bool',
|
||||
'content' => [],
|
||||
'value' => '0',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '1',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'apiupload',
|
||||
'title' => 'API接口使用云存储',
|
||||
'type' => 'bool',
|
||||
'name' => 'apiupload',
|
||||
'title' => 'API接口使用云存储',
|
||||
'type' => 'bool',
|
||||
'content' => [],
|
||||
'value' => '0',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '1',
|
||||
'rule' => 'required',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
[
|
||||
'name' => 'noneedlogin',
|
||||
'title' => '免登录上传',
|
||||
'type' => 'checkbox',
|
||||
'name' => 'noneedlogin',
|
||||
'title' => '免登录上传',
|
||||
'type' => 'checkbox',
|
||||
'content' => [
|
||||
'api' => 'API',
|
||||
'api' => 'API',
|
||||
'index' => '前台',
|
||||
'admin' => '后台',
|
||||
],
|
||||
'value' => '',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
'value' => '',
|
||||
'rule' => '',
|
||||
'msg' => '',
|
||||
'tip' => '',
|
||||
'ok' => '',
|
||||
'extend' => '',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@
|
|||
|
||||
namespace app\admin\behavior;
|
||||
|
||||
use think\Lang;
|
||||
|
||||
class OrderLog
|
||||
{
|
||||
//记录订单日志
|
||||
public function run(&$response)
|
||||
{
|
||||
|
||||
Lang::load(APP_PATH . 'admin/lang/zh-cn/order.php');
|
||||
|
||||
$Model = new \app\admin\model\Order();
|
||||
$statusList = $Model->getStatusList();
|
||||
$order = $response['order']; //订单对象
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ use app\common\controller\Backend;
|
|||
use fast\Random;
|
||||
use fast\Tree;
|
||||
use think\Db;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
|
|
@ -294,4 +296,66 @@ class Admin extends Backend
|
|||
$this->dataLimitField = 'id';
|
||||
return parent::selectpage();
|
||||
}
|
||||
|
||||
public function areaget(){
|
||||
$user_id = request()->get('user_id');
|
||||
$data = model('area')->getTree();
|
||||
|
||||
if ($user_id){
|
||||
$user = model('admin')->get($user_id);
|
||||
$in_areas = explode(',',$user->area_ids ?? '');
|
||||
foreach ($data as &$datum){
|
||||
if (in_array($datum['id'],$in_areas)){
|
||||
$datum['state'] = [
|
||||
'selected' => true
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
public function area($ids = null){
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
// dd($areas);
|
||||
$this->view->assign('user_id',$ids);
|
||||
// dd($areas);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||
$params[$this->dataLimitField] = $this->auth->id;
|
||||
}
|
||||
$result = false;
|
||||
// 获取当前ID对应的订单信息
|
||||
$user = $this->model->get($ids);
|
||||
if (!$user) {
|
||||
$this->error('订单不存在');
|
||||
}
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||
$this->model->validateFailException()->validate($validate);
|
||||
}
|
||||
$result = $user->save($params);
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class Abnormal extends Backend
|
|||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
|
||||
$order_id = $this->request->get('order_id');
|
||||
$order_id = $this->request->get('ids');
|
||||
|
||||
$this->assign('order_id',$order_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class Auditorder extends Backend
|
|||
$list = $this->model
|
||||
->scope('tab',Order::TAB_AUDIT)
|
||||
->alias('order')
|
||||
->with(['auditadmin:id,username,nickname'])
|
||||
->with(['auditadmin'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
|
@ -109,6 +109,9 @@ class Auditorder extends Backend
|
|||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
|
||||
$audit_status = $params['audit_status'];
|
||||
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
|
|
@ -122,14 +125,22 @@ class Auditorder extends Backend
|
|||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
|
||||
if($audit_status){
|
||||
$params['status'] = Order::STATUS_FINISHED;
|
||||
}else{
|
||||
$params['status'] = Order::STATUS_CHECKING;
|
||||
}
|
||||
|
||||
$params['audit_admin_id'] = $this->auth->id;
|
||||
$params['status'] = Order::STATUS_FINISHED;
|
||||
|
||||
$result = $row->allowField(true)->save($params);
|
||||
|
||||
$params['order'] = $row;
|
||||
$params['role'] = 1;
|
||||
$params['auth'] = $this->auth;
|
||||
Hook::listen('order_change',$params);
|
||||
$hookParams['order'] = $row;
|
||||
$hookParams['role'] = 1;
|
||||
$hookParams['auth'] = $this->auth;
|
||||
$hookParams['remark'] = $params['audit_remark'];
|
||||
Hook::listen('order_change',$hookParams);
|
||||
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
|
|
|
|||
156
application/admin/controller/orders/Configorder.php
Normal file
156
application/admin/controller/orders/Configorder.php
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\orders;
|
||||
|
||||
use app\admin\model\Order;
|
||||
use app\common\controller\Backend;
|
||||
use think\Db;
|
||||
use think\Exception;
|
||||
use think\exception\DbException;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Hook;
|
||||
|
||||
/**
|
||||
* 订单列管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Configorder extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* Configorder模型对象
|
||||
* @var Order
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
$this->model = new Order();
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
$list = $this->model
|
||||
->tab(Order::TAB_SETTING)
|
||||
->auth($this->auth)
|
||||
->areaauth($this->auth)
|
||||
->with(['dispatch'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as $row)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->view->assign('row', $row);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if($row->status != Order::STATUS_CHECKING){
|
||||
$this->error('订单不允许操作');
|
||||
}
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
|
||||
$data = [
|
||||
'status' => Order::STATUS_AUDITING,
|
||||
'offline_amount' => $params['offline_amount'],
|
||||
'refund_amount' => $params['refund_amount'],
|
||||
'cost' => $params['cost'],
|
||||
];
|
||||
|
||||
$data['total'] = bcadd($row->online_amount,$params['offline_amount'],2);
|
||||
$data['real_amount'] = bcsub($data['total'],$params['refund_amount'],2);
|
||||
$data['performance'] = bcsub($data['real_amount'],$params['cost'],2);
|
||||
$result = $row->allowField(true)->save($data);
|
||||
|
||||
//日志
|
||||
|
||||
$params['order'] = $row;
|
||||
$params['role'] = 1;
|
||||
$params['auth'] = $this->auth;
|
||||
$params['remark'] = '';
|
||||
|
||||
Hook::listen('order_change', $params);
|
||||
|
||||
Db::commit();
|
||||
} catch (ValidateException|PDOException|Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -52,9 +52,6 @@ class Dispatch extends Backend
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
$orderModel = new Order();
|
||||
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
|
|
@ -76,7 +73,7 @@ class Dispatch extends Backend
|
|||
$row->btn_edit = (in_array($row->status, $this->model->btnActiveStatusList('btn_edit'))) ? true : false;
|
||||
$row->btn_cancel = (in_array($row->status, $this->model->btnActiveStatusList('btn_cancel'))) ? true : false;
|
||||
$row->btn_abnormal = (in_array($row->status, $this->model->btnActiveStatusList('btn_abnormal'))) ? true : false;
|
||||
$row->btn_income = (in_array($row->status, $this->model->btnActiveStatusList('btn_income')) && in_array($row->order->status, $orderModel->incomeBtnStatus())) ? true : false;
|
||||
// $row->btn_income = (in_array($row->status, $this->model->btnActiveStatusList('btn_income')) && in_array($row->order->status, $orderModel->incomeBtnStatus())) ? true : false;
|
||||
}
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
|
|
|
|||
452
application/admin/controller/orders/Dispatch2.php
Normal file
452
application/admin/controller/orders/Dispatch2.php
Normal file
|
|
@ -0,0 +1,452 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\controller\orders;
|
||||
|
||||
use app\admin\model\Order;
|
||||
use app\admin\model\OrderDispatch;
|
||||
use app\common\controller\Backend;
|
||||
use app\common\Logic\OrderLogic;
|
||||
use think\Db;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Exception;
|
||||
use think\exception\DbException;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Hook;
|
||||
|
||||
/**
|
||||
* 派单列管理
|
||||
*
|
||||
* @icon fa fa-circle-o
|
||||
*/
|
||||
class Dispatch2 extends Backend
|
||||
{
|
||||
|
||||
/**
|
||||
* OrderDispatch模型对象
|
||||
* @var \app\admin\model\OrderDispatch
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
protected $searchFields = 'order.order_no,order.tel,order.customer,worker_name,worker_tel';
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
|
||||
//加载当前控制器语言包
|
||||
$this->model = new \app\admin\model\OrderDispatch;
|
||||
$this->view->assign("typeList", $this->model->getTypeList());
|
||||
$this->view->assign("statusList", $this->model->getStatusList());
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
|
||||
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
|
||||
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 查看
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//当前是否为关联查询
|
||||
$this->relationSearch = true;
|
||||
//设置过滤方法
|
||||
$this->request->filter(['strip_tags', 'trim']);
|
||||
if ($this->request->isAjax()) {
|
||||
//如果发送的来源是Selectpage,则转发到Selectpage
|
||||
if ($this->request->request('keyField')) {
|
||||
return $this->selectpage();
|
||||
}
|
||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$list = $this->model
|
||||
->with(['order'])
|
||||
->auth($this->auth)
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
->paginate($limit);
|
||||
|
||||
foreach ($list as &$row) {
|
||||
$row->btn_edit = (in_array($row->status, $this->model->btnActiveStatusList('btn_edit'))) ? true : false;
|
||||
$row->btn_cancel = (in_array($row->status, $this->model->btnActiveStatusList('btn_cancel'))) ? true : false;
|
||||
$row->btn_abnormal = (in_array($row->status, $this->model->btnActiveStatusList('btn_abnormal'))) ? true : false;
|
||||
$row->btn_finished = (in_array($row->status, $this->model->btnActiveStatusList('btn_finished'))) ? true : false;
|
||||
$row->is_disabled = (in_array($row->status, $this->model->btnActiveStatusList('disabled_status'))) ? true : false;
|
||||
// $row->btn_income = (in_array($row->status, $this->model->btnActiveStatusList('btn_income')) && in_array($row->order->status, $orderModel->incomeBtnStatus())) ? true : false;
|
||||
}
|
||||
$result = array("total" => $list->total(), "rows" => $list->items());
|
||||
|
||||
return json($result);
|
||||
}
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @return string
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
$id = $this->request->param('order_id');
|
||||
$order = model('order')->where('id', $id)->find();
|
||||
if (!$order) {
|
||||
$this->error(__('No results were found'));
|
||||
}
|
||||
|
||||
$items = Db::name('item')
|
||||
->where('status',1)
|
||||
->field(['id','title','key_word','pid'])
|
||||
->order('pid','asc')
|
||||
->order('sort','desc')
|
||||
->select();
|
||||
|
||||
$tree = $this->buildTree($items);
|
||||
$formattedTree = $this->formatTree($tree);
|
||||
|
||||
$area_name = model('area')->getNameByCode($order->area_id);
|
||||
$order->area_name = str_replace(',','/',$area_name);
|
||||
$this->view->assign('items', $formattedTree);
|
||||
$this->view->assign('row', $order);
|
||||
|
||||
return $this->view->fetch();
|
||||
}
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
|
||||
$params[$this->dataLimitField] = $this->auth->id;
|
||||
}
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
|
||||
$this->model->validateFailException()->validate($validate);
|
||||
}
|
||||
$order = model('order')->where('id',$params['order_id'])->find();
|
||||
if (!$order){
|
||||
$this->error(__('No results were found'));
|
||||
}
|
||||
$insert = [
|
||||
'admin_id' => $this->auth->id,
|
||||
'admin_user' => $this->auth->nickname,
|
||||
'order_id' => $params['order_id'],
|
||||
'type' => 1,
|
||||
'worker_id' => $params['worker_id'],
|
||||
'plan_time' => $order['plan_time'],
|
||||
'is_receipt' => $order['receive_type'] == 1
|
||||
];
|
||||
|
||||
$worker = model('worker')->where('id',$params['worker_id'])->find();
|
||||
$insert ['worker_name'] = $worker->name;
|
||||
$insert ['worker_tel'] = $worker->tel;
|
||||
|
||||
$result = $this->model->allowField(true)->save($insert);
|
||||
$order->status = Order::STATUS_DISPATCHED;
|
||||
$order->save();
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if ($result === false) {
|
||||
$this->error(__('No rows were inserted'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function edit($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
|
||||
$order = Order::where('id',$row->id)->with(['area'])->find();
|
||||
|
||||
if(empty($order)){
|
||||
$this->error(__('未找到关联订单'));
|
||||
}
|
||||
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('order', $order);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
$params = $this->request->post('row/a');
|
||||
|
||||
if(isset($params['action']) && $params['action'] == 'finish'){
|
||||
|
||||
return $this->finish($ids);
|
||||
}
|
||||
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
|
||||
if(!in_array($row->status ,$this->model->btnActiveStatusList('btn_edit'))){
|
||||
$this->error(__('任务状态已变更,请刷新后再操作'));
|
||||
}
|
||||
$params = $this->preExcludeFields($params);
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
if($row->worker_id != $params['worker_id']){ //更换了师傅
|
||||
|
||||
|
||||
}
|
||||
$result = $row->allowField(true)->save($params);
|
||||
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param $ids
|
||||
* @return string
|
||||
* @throws DbException
|
||||
* @throws \think\Exception
|
||||
*/
|
||||
public function finish($ids = null)
|
||||
{
|
||||
$row = $this->model->get($ids);
|
||||
if (!$row) {
|
||||
$this->error(__('No Results were found'));
|
||||
}
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
|
||||
$this->error(__('You have no permission'));
|
||||
}
|
||||
|
||||
$order = Order::where('id',$row->id)->find();
|
||||
|
||||
if(empty($order)){
|
||||
$this->error(__('未找到关联订单'));
|
||||
}
|
||||
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->view->assign('row', $row);
|
||||
$this->view->assign('order', $order);
|
||||
$this->view->assign('action','finish');
|
||||
return $this->view->fetch('edit');
|
||||
}
|
||||
|
||||
|
||||
$params = $this->request->post('row/a');
|
||||
if (empty($params)) {
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
|
||||
$params = $this->preExcludeFields($params);
|
||||
|
||||
if(!in_array($row->status, $this->model->btnActiveStatusList('btn_finished'))){
|
||||
$this->error('任务状态变更,请刷新后操作');
|
||||
}
|
||||
|
||||
if($order->status != Order::STATUS_DISPATCHED){
|
||||
$this->error('订单状态已变更,请刷新后操作');
|
||||
}
|
||||
|
||||
$result = false;
|
||||
Db::startTrans();
|
||||
try {
|
||||
//是否采用模型验证
|
||||
if ($this->modelValidate) {
|
||||
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
|
||||
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
|
||||
$row->validateFailException()->validate($validate);
|
||||
}
|
||||
$params['status'] = OrderDispatch::STATUS_FINISH;
|
||||
$params['finish_time'] = date('Y-m-d H:i:s');
|
||||
$result = $row->allowField(true)->save($params);
|
||||
|
||||
//修改订单状态
|
||||
$OrderLogic = new OrderLogic();
|
||||
$OrderLogic -> dispachFinishAfter($row,['role'=>1,'auth'=>$this->auth]);
|
||||
Db::commit();
|
||||
} catch (ValidateException | PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
if (false === $result) {
|
||||
$this->error(__('No rows were updated'));
|
||||
}
|
||||
$this->success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 取消派单
|
||||
*
|
||||
* @param $ids
|
||||
* @return void
|
||||
* @throws DbException
|
||||
* @throws DataNotFoundException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
// public function del($ids = null)
|
||||
// {
|
||||
// if (false === $this->request->isPost()) {
|
||||
// $this->error(__("Invalid parameters"));
|
||||
// }
|
||||
// $ids = $ids ?: $this->request->post("ids");
|
||||
// if (empty($ids)) {
|
||||
// $this->error(__('Parameter %s can not be empty', 'ids'));
|
||||
// }
|
||||
// $pk = $this->model->getPk();
|
||||
// $adminIds = $this->getDataLimitAdminIds();
|
||||
// if (is_array($adminIds)) {
|
||||
// $this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
// }
|
||||
// $list = $this->model->where($pk, 'in', $ids)->whereIn('status', $this->model->deleteStatusList())->select();
|
||||
//
|
||||
// $remark = $this->request->param('remark', '');
|
||||
//
|
||||
// $count = 0;
|
||||
// Db::startTrans();
|
||||
// try {
|
||||
// foreach ($list as $item) {
|
||||
// //$count += $item->delete();
|
||||
// $order = Order::where('id', $item->order_id)->where('status', Order::STATUS_DISPATCHED)->find();
|
||||
// if (!$order) {
|
||||
// $this->error('订单状态已变更,请刷新后操作');
|
||||
// }
|
||||
// //取消
|
||||
// $item->save(['status' => OrderDispatch::STATUS_CANCEL, 'remark' => $remark]);
|
||||
// //回退订单状态
|
||||
// $order->allowField(true)->save(['status' => Order::STATUS_DISPATCHING]);
|
||||
//
|
||||
// $params['order'] = $order->ref;
|
||||
// $params['role'] = 1;
|
||||
// $params['auth'] = $this->auth;
|
||||
// $params['remark'] = '派单被取消[ID:' . $item->id . '],订单状态回退';
|
||||
// if (!empty($remark)) {
|
||||
// $params['remark'] .= ',操作备注:' . $remark;
|
||||
// }
|
||||
// Hook::listen('order_change', $params);
|
||||
// }
|
||||
// Db::commit();
|
||||
// } catch (PDOException | Exception $e) {
|
||||
// Db::rollback();
|
||||
// throw $e;
|
||||
// $this->error($e->getMessage());
|
||||
// }
|
||||
//
|
||||
// $this->error(__('取消成功'));
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 取消派单
|
||||
*
|
||||
* @param $ids
|
||||
* @return void
|
||||
* @throws DbException
|
||||
* @throws DataNotFoundException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
public function del($ids=null)
|
||||
{
|
||||
if (false === $this->request->isPost()) {
|
||||
$this->error(__("Invalid parameters"));
|
||||
}
|
||||
$ids = $this->request->post("ids/a");
|
||||
$reason = $this->request->post("reason");
|
||||
|
||||
if (empty($ids)) {
|
||||
$this->error(__('Parameter %s can not be empty', 'ids'));
|
||||
}
|
||||
$pk = $this->model->getPk();
|
||||
$adminIds = $this->getDataLimitAdminIds();
|
||||
if (is_array($adminIds)) {
|
||||
$this->model->where($this->dataLimitField, 'in', $adminIds);
|
||||
}
|
||||
$list = $this->model->where($pk, 'in', $ids)->whereIn('status', $this->model->deleteStatusList())->select();
|
||||
|
||||
if(count($list) != count($ids)){
|
||||
$this->error(__("任务状态不可操作,请刷新页面后再操作"));
|
||||
}
|
||||
|
||||
$remark = $reason;
|
||||
$count = 0;
|
||||
Db::startTrans();
|
||||
try {
|
||||
foreach ($list as $item) {
|
||||
//$count += $item->delete();
|
||||
$order = Order::where('id', $item->order_id)->where('status', Order::STATUS_DISPATCHED)->find();
|
||||
if (!$order) {
|
||||
$this->error('订单状态已变更,请刷新后操作');
|
||||
}
|
||||
//取消
|
||||
$item->save(['status' => OrderDispatch::STATUS_CANCEL, 'remark' => $remark]);
|
||||
//回退订单状态
|
||||
$order->allowField(true)->save(['status' => Order::STATUS_DISPATCHING]);
|
||||
$params['order'] = $order;
|
||||
$params['role'] = 1;
|
||||
$params['auth'] = $this->auth;
|
||||
$params['remark'] = '派单被取消[ID:' . $item->id . '],订单状态回退';
|
||||
if (!empty($remark)) {
|
||||
$params['remark'] .= ',操作备注:' . $remark;
|
||||
}
|
||||
Hook::listen('order_change', $params);
|
||||
}
|
||||
Db::commit();
|
||||
} catch (PDOException | Exception $e) {
|
||||
Db::rollback();
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
/* if ($count) {
|
||||
$this->success();
|
||||
}*/
|
||||
$this->success(__('取消成功'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,9 @@ namespace app\admin\controller\user;
|
|||
|
||||
use app\common\controller\Backend;
|
||||
use app\common\library\Auth;
|
||||
use think\Db;
|
||||
use think\exception\PDOException;
|
||||
use think\exception\ValidateException;
|
||||
|
||||
/**
|
||||
* 会员管理
|
||||
|
|
|
|||
|
|
@ -49,9 +49,7 @@ class Worker extends Backend
|
|||
unset($v['sort']);
|
||||
unset($v['status']);
|
||||
}
|
||||
|
||||
$this->tree = $res;
|
||||
|
||||
$this->view->assign("tree", $res);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
return [
|
||||
'Id' => 'ID',
|
||||
'Order_id' => '订单ID',
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '订单编号',
|
||||
'Tel' => '客户手机',
|
||||
'Item_type' => '收款事项',
|
||||
'Item_type 1' => '定金',
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ return [
|
|||
'From 1' => '师傅',
|
||||
'From 2' => '顾客',
|
||||
'From 3' => '平台',
|
||||
'Refund_amount' => '总退款金额',
|
||||
'Refund_amount' => '退款金额',
|
||||
'Company_refund_amount' => '公司退款金额',
|
||||
'Worker_refund_amount' => '师傅退款金额',
|
||||
'Refund_type' => '退款方式',
|
||||
|
|
@ -45,7 +45,7 @@ return [
|
|||
'Handle_admin_user' => '处理人',
|
||||
'Star' => '评分',
|
||||
'Order.id' => 'ID',
|
||||
'Order.order_no' => '订单号',
|
||||
'Order.order_no' => '订单编号',
|
||||
'Order.customer' => '客户姓名',
|
||||
'Order.tel' => '客户电话',
|
||||
'Order.status' => '订单状态',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
return [
|
||||
'Id' => 'ID',
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '订单编号',
|
||||
'Customer' => '客户姓名',
|
||||
'Tel' => '客户电话',
|
||||
'Status' => '订单状态',
|
||||
|
|
@ -14,8 +14,8 @@ return [
|
|||
'Set status to 20' => '设为已派单',
|
||||
'Status 30' => '进行中',
|
||||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待验收',
|
||||
'Set status to 40' => '设为待验收',
|
||||
'Status 40' => '待配置',
|
||||
'Set status to 40' => '设为待配置',
|
||||
'Status 41' => '审核驳回',
|
||||
'Set status to 41' => '设为审核驳回',
|
||||
'Status 50' => '待财务审核',
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ return [
|
|||
'Create_time' => '创建时间',
|
||||
'Update_time' => '编辑时间',
|
||||
'Order.id' => 'ID',
|
||||
'Order.order_no' => '订单号',
|
||||
'Order.order_no' => '订单编号',
|
||||
'Order.customer' => '客户姓名',
|
||||
'Order.tel' => '客户电话',
|
||||
'Order.status' => '订单状态',
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
return [
|
||||
'Id' => 'ID',
|
||||
'User_id' => '用户ID',
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '订单编号',
|
||||
'Customer' => '客户姓名',
|
||||
'Tel' => '客户电话',
|
||||
'Status' => '订单状态',
|
||||
|
|
@ -13,12 +13,12 @@ return [
|
|||
'Set status to 20' => '设为已派单',
|
||||
'Status 30' => '进行中',
|
||||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待验收',
|
||||
'Set status to 40' => '设为待验收',
|
||||
'Status 40' => '待配置',
|
||||
'Set status to 40' => '设为待配置',
|
||||
'Status 41' => '审核驳回',
|
||||
'Set status to 41' => '设为审核驳回',
|
||||
'Status 50' => '待审核',
|
||||
'Set status to 50' => '设为待审核',
|
||||
'Status 50' => '待结算',
|
||||
'Set status to 50' => '设为待结算',
|
||||
'Status 60' => '已完成',
|
||||
'Set status to 60' => '设为已完成',
|
||||
'Status -10' => '取消',
|
||||
|
|
@ -36,7 +36,7 @@ return [
|
|||
'Detail' => '订单详情',
|
||||
'Remark' => '订单备注',
|
||||
'Images' => '图片',
|
||||
'Plan_time' => '客户预约时间',
|
||||
'Plan_time' => '预约时间',
|
||||
'Admin_id' => '录单员ID',
|
||||
'Total' => '总收款',
|
||||
'Online_amount' => '线上收款',
|
||||
|
|
|
|||
87
application/admin/lang/zh-cn/orders/configorder.php
Normal file
87
application/admin/lang/zh-cn/orders/configorder.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'Id' => 'ID',
|
||||
'Order_no' => '订单编号',
|
||||
'Customer' => '客户姓名',
|
||||
'Tel' => '客户电话',
|
||||
'Status' => '订单状态',
|
||||
'Status 0' => '草稿',
|
||||
'Set status to 0' => '设为草稿',
|
||||
'Status 10' => '未派单',
|
||||
'Set status to 10' => '设为未派单',
|
||||
'Status 20' => '已派单',
|
||||
'Set status to 20' => '设为已派单',
|
||||
'Status 30' => '进行中',
|
||||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待配置',
|
||||
'Set status to 40' => '设为待配置',
|
||||
'Status 50' => '待财务审核',
|
||||
'Set status to 50' => '设为待财务审核',
|
||||
'Status 60' => '已完成',
|
||||
'Set status to 60' => '设为已完成',
|
||||
'Status -10' => '取消',
|
||||
'Set status to -10' => '设为取消',
|
||||
'Area_id' => '地域',
|
||||
'Address' => '详细地址',
|
||||
'Lng' => '经度',
|
||||
'Lat' => '纬度',
|
||||
'Work_tel_id' => '工作机',
|
||||
'Source_shop' => '来源店铺',
|
||||
'Source' => '订单来源',
|
||||
'Source_uid' => '来源UID',
|
||||
'Item_id' => '服务ID',
|
||||
'Item_title' => '服务名称',
|
||||
'Detail' => '订单详情',
|
||||
'Remark' => '订单备注',
|
||||
'Images' => '图片',
|
||||
'Plan_time' => '预约时间',
|
||||
'Admin_id' => '录单员ID',
|
||||
'Coupon_id' => '优惠码id',
|
||||
'Total' => '总收款',
|
||||
'Online_amount' => '线上收款',
|
||||
'Offline_amount' => '线下收款',
|
||||
'Discount_amount' => '优惠抵扣',
|
||||
'Refund_amount' => '退款金额',
|
||||
'Real_amount' => '实际收款',
|
||||
'Cost' => '师傅成本',
|
||||
'Performance' => '预计利润',
|
||||
'Cancel_reason_id' => '取消原因',
|
||||
'Cancel_detail' => '取消详情',
|
||||
'Audit_remark' => '审核备注',
|
||||
'Audit_admin_id' => '审核员',
|
||||
'Create_time' => '录单时间',
|
||||
'Update_time' => '更新时间',
|
||||
'Delete_time' => '删除时间',
|
||||
'Dispatch_type' => '1 手动派单 2自动排单',
|
||||
'Receive_type' => '1 定金 2全款',
|
||||
'Dispatch.id' => 'ID',
|
||||
'Dispatch.order_id' => '订单ID',
|
||||
'Dispatch.type' => '派单方式',
|
||||
'Dispatch.type 1' => '手动',
|
||||
'Dispatch.worker_id' => '师傅ID',
|
||||
'Dispatch.worker_name' => '师傅姓名',
|
||||
'Dispatch.worker_tel' => '师傅电话',
|
||||
'Dispatch.status' => '进度',
|
||||
'Dispatch.status 0' => '待接单',
|
||||
'Dispatch.status 10' => '已接单',
|
||||
'Dispatch.status 20' => '已预约',
|
||||
'Dispatch.status 25' => '已开始未打卡',
|
||||
'Dispatch.status 30' => '已打卡',
|
||||
'Dispatch.status 60' => '已完成',
|
||||
'Dispatch.status -10' => '已拒接',
|
||||
'Dispatch.status -20' => '已移交',
|
||||
'Dispatch.status -30' => '已取消',
|
||||
'Dispatch.is_receipt' => '是否收款:0否,1是',
|
||||
'Dispatch.total' => '师傅收款金额',
|
||||
'Dispatch.remark' => '备注',
|
||||
'Dispatch.notice_num' => '通知次数',
|
||||
'Dispatch.images' => '完成图片',
|
||||
'Dispatch.image' => '收款凭证',
|
||||
'Dispatch.plan_time' => '预约时间',
|
||||
'Dispatch.finish_time' => '完成时间',
|
||||
'Dispatch.admin_id' => '派单人ID',
|
||||
'Dispatch.admin_user' => '派单人',
|
||||
'Dispatch.create_time' => '派单时间',
|
||||
'Dispatch.update_time' => '编辑时间'
|
||||
];
|
||||
|
|
@ -36,14 +36,14 @@ return [
|
|||
'Create_time' => '派单时间',
|
||||
'Update_time' => '编辑时间',
|
||||
'Order.id' => 'ID',
|
||||
'Order.order_no' => '订单号',
|
||||
'Order.order_no' => '订单编号',
|
||||
'Order.customer' => '客户姓名',
|
||||
'Order.tel' => '客户电话',
|
||||
'Order.status' => '订单状态',
|
||||
'Order.status 10' => '未派单',
|
||||
'Order.status 20' => '已派单',
|
||||
'Order.status 30' => '进行中',
|
||||
'Order.status 40' => '待验收',
|
||||
'Order.status 40' => '待配置',
|
||||
'Order.status 41' => '审核驳回',
|
||||
'Order.status 50' => '待财务审核',
|
||||
'Order.status 60' => '已完成',
|
||||
|
|
@ -61,14 +61,14 @@ return [
|
|||
'Order.detail' => '订单详情',
|
||||
'Order.remark' => '订单备注',
|
||||
'Order.images' => '图片',
|
||||
'Order.plan_time' => '客户预约时间',
|
||||
'Order.plan_time' => '预约时间',
|
||||
'Order.admin_id' => '录单员ID',
|
||||
'Order.coupon_id' => '优惠码id',
|
||||
'Order.total' => '总收款',
|
||||
'Order.online_amount' => '线上收款',
|
||||
'Order.offline_amount' => '线下收款',
|
||||
'Order.discount_amount' => '优惠抵扣',
|
||||
'Order.refund_amount' => '总退款额',
|
||||
'Order.refund_amount' => '退款金额',
|
||||
'Order.real_amount' => '实际收款',
|
||||
'Order.cost' => '师傅成本',
|
||||
'Order.performance' => '预计利润',
|
||||
|
|
|
|||
82
application/admin/lang/zh-cn/orders/dispatch2.php
Normal file
82
application/admin/lang/zh-cn/orders/dispatch2.php
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'Id' => 'ID',
|
||||
'Order_id' => '订单ID',
|
||||
'Type' => '派单方式',
|
||||
'Type 1' => '手动',
|
||||
'Worker_id' => '师傅ID',
|
||||
'Worker_name' => '师傅姓名',
|
||||
'Worker_tel' => '师傅电话',
|
||||
'Status' => '进度',
|
||||
'Status 0' => '待接单',
|
||||
'Set status to 0' => '设为待接单',
|
||||
'Status 10' => '已接单',
|
||||
'Set status to 10' => '设为已接单',
|
||||
'Status 25' => '任务超时',
|
||||
'Set status to 25' => '设为已开始',
|
||||
'Status 20' => '已预约',
|
||||
'Set status to 20' => '设为已预约',
|
||||
'Status 30' => '已打卡',
|
||||
'Set status to 30' => '设为已打卡',
|
||||
'Status 60' => '已完成',
|
||||
'Set status to 60' => '设为已完成',
|
||||
'Status -10' => '已拒接',
|
||||
'Set status to -10' => '设为已拒接',
|
||||
'Status -20' => '已移交',
|
||||
'Set status to -20' => '设为已移交',
|
||||
'Status -30' => '已取消',
|
||||
'Set status to -30' => '设为已取消',
|
||||
'Remark' => '备注',
|
||||
'Notice_num' => '通知次数',
|
||||
'Plan_time' => '预约时间',
|
||||
'Finish_time' => '完成时间',
|
||||
'Admin_id' => '派单人ID',
|
||||
'Admin_user' => '派单人',
|
||||
'Create_time' => '派单时间',
|
||||
'Update_time' => '更新时间',
|
||||
'Order.id' => 'ID',
|
||||
'Order.order_no' => '订单编号',
|
||||
'Order.customer' => '客户姓名',
|
||||
'Order.tel' => '客户电话',
|
||||
'Order.status' => '订单状态',
|
||||
'Order.status 10' => '未派单',
|
||||
'Order.status 20' => '已派单',
|
||||
'Order.status 30' => '进行中',
|
||||
'Order.status 40' => '待配置',
|
||||
'Order.status 41' => '审核驳回',
|
||||
'Order.status 50' => '待财务审核',
|
||||
'Order.status 60' => '已完成',
|
||||
'Order.status -10' => '取消',
|
||||
'Order.area_id' => '地域',
|
||||
'Order.address' => '详细地址',
|
||||
'Order.lng' => '经度',
|
||||
'Order.lat' => '纬度',
|
||||
'Order.work_tel_id' => '工作机',
|
||||
'Order.source_shop' => '来源店铺',
|
||||
'Order.source' => '订单来源',
|
||||
'Order.source_uid' => '来源UID',
|
||||
'Order.item_id' => '服务ID',
|
||||
'Order.item_title' => '服务名称',
|
||||
'Order.detail' => '订单详情',
|
||||
'Order.remark' => '订单备注',
|
||||
'Order.images' => '图片',
|
||||
'Order.plan_time' => '预约时间',
|
||||
'Order.admin_id' => '录单员ID',
|
||||
'Order.coupon_id' => '优惠码id',
|
||||
'Order.total' => '总收款',
|
||||
'Order.online_amount' => '线上收款',
|
||||
'Order.offline_amount' => '线下收款',
|
||||
'Order.discount_amount' => '优惠抵扣',
|
||||
'Order.refund_amount' => '退款金额',
|
||||
'Order.real_amount' => '实际收款',
|
||||
'Order.cost' => '师傅成本',
|
||||
'Order.performance' => '预计利润',
|
||||
'Order.cancel_reason_id' => '取消原因',
|
||||
'Order.cancel_detail' => '取消详情',
|
||||
'Order.audit_remark' => '审核备注',
|
||||
'Order.audit_admin_id' => '审核员',
|
||||
'Order.create_time' => '录单时间',
|
||||
'Order.update_time' => '更新时间',
|
||||
'Order.delete_time' => '删除时间'
|
||||
];
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
return [
|
||||
'Id' => 'ID',
|
||||
'Order_id' => '订单ID',
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '订单编号',
|
||||
'Tel' => '客户手机',
|
||||
'Item_type' => '收款事项',
|
||||
'Item_type 1' => '定金',
|
||||
|
|
@ -12,7 +12,7 @@ return [
|
|||
'Item_type 4' => '其它',
|
||||
|
||||
'Status' => '审核状态',
|
||||
'Status 0' => '待审核',
|
||||
'Status 0' => '待结算',
|
||||
'Status 1' => '通过',
|
||||
'Status -1' => '未通过',
|
||||
'Audit_remark' => '审核备注',
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ return [
|
|||
'Remark' => '备注',
|
||||
'Create_time' => '创建时间',
|
||||
'Order.id' => 'ID',
|
||||
'Order.order_no' => '订单号',
|
||||
'Order.order_no' => '订单编号',
|
||||
'Order.customer' => '客户姓名',
|
||||
'Order.tel' => '客户电话',
|
||||
'Order.status' => '订单状态',
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
return [
|
||||
'Id' => 'ID',
|
||||
'Order_no' => '订单号',
|
||||
'Order_no' => '订单编号',
|
||||
'Customer' => '客户姓名',
|
||||
'Tel' => '客户电话',
|
||||
'Status' => '订单状态',
|
||||
|
|
@ -12,8 +12,8 @@ return [
|
|||
'Set status to 20' => '设为已派单',
|
||||
'Status 30' => '进行中',
|
||||
'Set status to 30' => '设为进行中',
|
||||
'Status 40' => '待验收',
|
||||
'Set status to 40' => '设为待验收',
|
||||
'Status 40' => '待配置',
|
||||
'Set status to 40' => '设为待配置',
|
||||
'Status 41' => '审核驳回',
|
||||
'Set status to 41' => '设为审核驳回',
|
||||
'Status 50' => '待财务审核',
|
||||
|
|
@ -35,7 +35,7 @@ return [
|
|||
'Detail' => '订单详情',
|
||||
'Remark' => '订单备注',
|
||||
'Images' => '图片',
|
||||
'Plan_time' => '客户预约时间',
|
||||
'Plan_time' => '预约时间',
|
||||
'Admin_id' => '录单员ID',
|
||||
'Total' => '总收款',
|
||||
'Cost' => '师傅成本',
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace app\admin\model;
|
||||
|
||||
use fast\Tree;
|
||||
use think\Model;
|
||||
|
||||
|
||||
|
|
@ -16,6 +17,41 @@ class Area extends Model
|
|||
return $this->where('area_code','=',$code)
|
||||
->value('merge_name');
|
||||
}
|
||||
|
||||
public function getTree(){
|
||||
|
||||
$res = $this->field(['city_code','code','name','level','province_code'])
|
||||
->where('level','<',3)
|
||||
->select();
|
||||
|
||||
|
||||
// dd($ruleList);
|
||||
|
||||
foreach ($res as &$v) {
|
||||
$v = $v->toArray();
|
||||
$v['state'] = ['selected' => false];
|
||||
if ($v['level'] == 2){
|
||||
$v['pid'] = $v['province_code'] ?: 0;
|
||||
$v['parent'] = $v['province_code'] ?: '#';
|
||||
}else{
|
||||
$v['pid'] = $v['city_code'] ?: 0;
|
||||
$v['parent'] = $v['city_code'] ?: '#';
|
||||
}
|
||||
$v['id'] = $v['code'];
|
||||
$v['text'] = $v['name'];
|
||||
unset($v['province_code']);
|
||||
unset($v['city_code']);
|
||||
unset($v['level']);
|
||||
unset($v['code']);
|
||||
}
|
||||
// dd($res);
|
||||
Tree::instance()->init($res)->icon =
|
||||
[' ', ' ', ' '];
|
||||
|
||||
$res = Tree::instance()->getTreeList(Tree::instance()->getTreeArray(0));
|
||||
// dd($res);
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\admin\library\Auth;
|
||||
use think\Model;
|
||||
use traits\model\SoftDelete;
|
||||
|
||||
|
|
@ -37,6 +38,8 @@ class Order extends Model
|
|||
|
||||
const TAB_PENDING = 'pending'; //跟进中
|
||||
|
||||
const TAB_SETTING = 'setting'; //跟进中
|
||||
|
||||
const TAB_AUDIT = 'audit'; //审核
|
||||
|
||||
const TAB_REVIEW = 'review'; //回访
|
||||
|
|
@ -121,10 +124,13 @@ class Order extends Model
|
|||
self::TAB_AUDIT => [
|
||||
self::STATUS_AUDITING,
|
||||
self::STATUS_FINISHED
|
||||
], //待审核
|
||||
], //待结算
|
||||
self::TAB_REVIEW => [
|
||||
self::STATUS_FINISHED
|
||||
],
|
||||
self::TAB_SETTING => [
|
||||
self::STATUS_CHECKING
|
||||
],
|
||||
];
|
||||
return $tabStatus[$tab] ?? [];
|
||||
}
|
||||
|
|
@ -148,4 +154,43 @@ class Order extends Model
|
|||
public function auditadmin(){
|
||||
return $this->belongsTo(Admin::class,'audit_admin_id',);
|
||||
}
|
||||
|
||||
public function dispatch()
|
||||
{
|
||||
return $this->hasOne(OrderDispatch::class, 'order_id', 'id', [], 'LEFT')->setEagerlyType(0)->where('fa_order_dispatch.status',OrderDispatch::STATUS_FINISH);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 管理员权限
|
||||
* @param $query
|
||||
* @param Auth $auth
|
||||
* @param string $auth_admin_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeAuth($query, Auth $auth, string $admin_id_field='admin_id'){
|
||||
|
||||
if(!$auth->isSuperAdmin()){
|
||||
$query->where('fa_order.'.$admin_id_field,$auth->id);
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地域权限
|
||||
* @param $query
|
||||
* @param Auth $auth
|
||||
* @param string $area_id_field
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeAreaauth($query,Auth $auth,string $area_id_field='area_id'){
|
||||
if(!$auth->isSuperAdmin()){
|
||||
$areaIds = array_unique(array_filter(explode(',',trim($auth->area_ids))));
|
||||
if(!in_array('*',$areaIds)){
|
||||
$query->whereIn('fa_order.'.$area_id_field,$areaIds);
|
||||
}
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\admin\library\Auth;
|
||||
use think\Model;
|
||||
|
||||
|
||||
|
|
@ -34,10 +35,11 @@ class OrderDispatch extends Model
|
|||
const STATUS_TOGET = 0; //待接
|
||||
const STATUS_GOTIT = 10; //已接
|
||||
const STATUS_PLANIT = 20; //已预约
|
||||
const STATUS_OVERTIME = 25; //超时(过了预约时间)
|
||||
const STATUS_CLOCK = 30; //已打卡
|
||||
const STATUS_FINISH = 60; //完成
|
||||
const STATUS_REFUSED = -10; //拒绝
|
||||
const STATUS_MOVE = -20; //中转
|
||||
const STATUS_MOVE = -20; //中转(状态废弃)
|
||||
const STATUS_CANCEL = -30; //取消
|
||||
|
||||
|
||||
|
|
@ -48,7 +50,9 @@ class OrderDispatch extends Model
|
|||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['0' => __('Status 0'), '10' => __('Status 10'), '20' => __('Status 20'),'25' => __('Status 25'), '30' => __('Status 30'), '60' => __('Status 60'), '-10' => __('Status -10'), '-20' => __('Status -20'), '-30' => __('Status -30')];
|
||||
return ['0' => __('Status 0'), '10' => __('Status 10'), '20' => __('Status 20'),'25' => __('Status 25'), '30' => __('Status 30'), '60' => __('Status 60'), '-10' => __('Status -10'),
|
||||
// '-20' => __('Status -20'),
|
||||
'-30' => __('Status -30')];
|
||||
}
|
||||
|
||||
public function getIsNoticeList()
|
||||
|
|
@ -86,6 +90,7 @@ class OrderDispatch extends Model
|
|||
self::STATUS_TOGET,
|
||||
self::STATUS_GOTIT,
|
||||
self::STATUS_PLANIT,
|
||||
self::STATUS_OVERTIME,
|
||||
self::STATUS_CLOCK,
|
||||
];
|
||||
}
|
||||
|
|
@ -112,29 +117,57 @@ class OrderDispatch extends Model
|
|||
self::STATUS_TOGET,
|
||||
self::STATUS_GOTIT,
|
||||
self::STATUS_PLANIT,
|
||||
self::STATUS_OVERTIME,
|
||||
self::STATUS_CLOCK,
|
||||
],
|
||||
'btn_cancel' => [ //取消按钮
|
||||
self::STATUS_TOGET,
|
||||
self::STATUS_GOTIT,
|
||||
self::STATUS_PLANIT,
|
||||
self::STATUS_OVERTIME,
|
||||
self::STATUS_CLOCK,
|
||||
],
|
||||
'btn_abnormal' => [ //添加异常按钮
|
||||
self::STATUS_TOGET,
|
||||
self::STATUS_GOTIT,
|
||||
self::STATUS_PLANIT,
|
||||
self::STATUS_OVERTIME,
|
||||
self::STATUS_CLOCK,
|
||||
],
|
||||
'btn_income' => [
|
||||
'btn_finished' => [
|
||||
self::STATUS_TOGET,
|
||||
self::STATUS_GOTIT,
|
||||
self::STATUS_PLANIT,
|
||||
self::STATUS_OVERTIME,
|
||||
self::STATUS_CLOCK,
|
||||
self::STATUS_FINISH
|
||||
//self::STATUS_FINISH
|
||||
],
|
||||
'disabled_status' => [
|
||||
self::STATUS_FINISH,
|
||||
self::STATUS_CANCEL,
|
||||
self::STATUS_REFUSED,
|
||||
self::STATUS_MOVE
|
||||
]
|
||||
];
|
||||
|
||||
return $btns[$btn]??[];
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 管理员权限
|
||||
* @param $query
|
||||
* @param Auth $auth
|
||||
* @param string $auth_admin_id
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeAuth($query, Auth $auth, string $admin_id_field='admin_id'){
|
||||
|
||||
if(!$auth->isSuperAdmin()){
|
||||
$query->where('fa_order_dispatch.'.$admin_id_field,$auth->id);
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,4 @@ return [
|
|||
'app_end' => [
|
||||
'app\\admin\\behavior\\AdminLog',
|
||||
],
|
||||
|
||||
'order_change' => [
|
||||
'app\\admin\\behavior\\OrderLog',
|
||||
'app\\admin\\behavior\\OrderChangeAfter',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
27
application/admin/validate/Configorder.php
Normal file
27
application/admin/validate/Configorder.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Configorder extends Validate
|
||||
{
|
||||
/**
|
||||
* 验证规则
|
||||
*/
|
||||
protected $rule = [
|
||||
];
|
||||
/**
|
||||
* 提示消息
|
||||
*/
|
||||
protected $message = [
|
||||
];
|
||||
/**
|
||||
* 验证场景
|
||||
*/
|
||||
protected $scene = [
|
||||
'add' => [],
|
||||
'edit' => [],
|
||||
];
|
||||
|
||||
}
|
||||
|
|
@ -3,21 +3,10 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_id" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="">
|
||||
<input id="c-order_id" data-field="order_no" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="">
|
||||
</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">{:__('Handle_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -93,7 +82,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_appeal')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer_appeal" data-rule="required" class="form-control" name="row[customer_appeal]" type="text" value="">
|
||||
<textarea class="form-control" id="c-customer_appeal" name="row[customer_appeal]" data-rule="required" placeholder="客户诉求"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -119,57 +108,48 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" class="form-control" name="row[remark]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
<textarea id="c-remark" class="form-control" name="row[remark]" placeholder="备注"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-company_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[company_refund_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_refund_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[worker_refund_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Admin_user')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-admin_user" data-rule="required" class="form-control" name="row[admin_user]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_admin_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-handle_admin_id" data-rule="required" data-source="handle/admin/index" class="form-control selectpage" name="row[handle_admin_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_admin_user')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-handle_admin_user" data-rule="required" class="form-control" name="row[handle_admin_user]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Star')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-star" data-rule="required" class="form-control" name="row[star]" type="number" value="0">
|
||||
</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 layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
|
|||
|
|
@ -3,21 +3,10 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_id" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="{$row.order_id|htmlentities}">
|
||||
<input placeholder="选择订单编号" id="c-order_id" data-field="order_no" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="{$row.order_id|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">{:__('Handle_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -93,7 +82,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer_appeal')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer_appeal" data-rule="required" class="form-control" name="row[customer_appeal]" type="text" value="{$row.customer_appeal|htmlentities}">
|
||||
<textarea class="form-control" id="c-customer_appeal" name="row[customer_appeal]" data-rule="required" placeholder="客户诉求">{$row.customer_appeal|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -122,18 +111,7 @@
|
|||
<input id="c-remark" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Company_refund_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -170,6 +148,21 @@
|
|||
<input id="c-star" data-rule="required" class="form-control" name="row[star]" type="number" value="{$row.star|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 layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
|
|||
21
application/admin/view/auth/admin/area.html
Normal file
21
application/admin/view/auth/admin/area.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<form id="add-form" class="form-horizontal" role="form"
|
||||
data-toggle="validator" method="POST" action="">
|
||||
{:token()}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">管理区域配置:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<span class="text-muted"><input type="checkbox" name="" id="checkall" /> <label for="checkall"><span>{:__('Check all')}</span></label></span>
|
||||
<span class="text-muted"><input type="checkbox" name="" id="expandall" /> <label for="expandall"><span>{:__('Expand all')}</span></label></span>
|
||||
|
||||
<div id="treeview" style="margin-top: 10px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" value="{$user_id}" id="user_id" style="display: none">
|
||||
<input type="hidden" name="row[area_ids]" />
|
||||
<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>
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-detail" data-rule="required" class="form-control editor" rows="5" name="row[detail]" cols="50"></textarea>
|
||||
<textarea id="c-detail" data-rule="required" class="form-control" rows="5" name="row[detail]" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Handle_detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea id="c-handle_detail" class="form-control editor" rows="5" name="row[handle_detail]" cols="50">{$row.handle_detail|htmlentities}</textarea>
|
||||
<textarea id="c-handle_detail" class="form-control" rows="5" name="row[handle_detail]" cols="50">{$row.handle_detail|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -77,65 +77,6 @@
|
|||
</table>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_no')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_no" disabled data-rule="required" class="form-control" name="row[order_no]" type="text" value="{$row.order_no|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer" disabled class="form-control" name="row[customer]" type="text" value="{$row.customer|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tel" disabled data-rule="required" class="form-control" name="row[tel]" type="text" value="{$row.tel|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-address" disabled data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source_shop')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-source_shop" readonly data-rule="required" class="form-control" name="row[source_shop]" type="text" value="{$row.source_shop|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-source" readonly data-rule="required" class="form-control" name="row[source]" type="number" value="{$row.source|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Item_title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-item_title" readonly data-rule="required" class="form-control" name="row[item_title]" type="text" value="{$row.item_title|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-detail" readonly class="form-control" name="row[detail]" type="text" value="{$row.detail|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" readonly class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
|
@ -161,21 +102,14 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-offline_amount" data-rule="required" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="{$row.offline_amount|htmlentities}">
|
||||
<input id="c-offline_amount" readonly data-rule="required" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="{$row.offline_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-total" disabled data-rule="required" class="form-control" step="0.01" name="row[total]" type="number" value="{$row.total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Discount_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-discount_amount" disabled data-rule="required" class="form-control" step="0.01" name="row[discount_amount]" type="number" value="{$row.discount_amount|htmlentities}">
|
||||
<input id="c-total" readonly data-rule="required" class="form-control" step="0.01" name="row[total]" type="number" value="{$row.total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -183,14 +117,14 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_amount" disabled data-rule="required" class="form-control" step="0.01" name="row[refund_amount]" type="number" value="{$row.refund_amount|htmlentities}">
|
||||
<input id="c-refund_amount" readonly data-rule="required" class="form-control" step="0.01" name="row[refund_amount]" type="number" value="{$row.refund_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Real_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-real_amount" data-rule="required" class="form-control" step="0.01" name="row[real_amount]" type="number" value="{$row.real_amount|htmlentities}">
|
||||
<input id="c-real_amount" readonly data-rule="required" class="form-control" step="0.01" name="row[real_amount]" type="number" value="{$row.real_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -198,22 +132,36 @@
|
|||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
|
||||
<input id="c-cost" readonly data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Performance')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-performance" data-rule="required" class="form-control" step="0.01" name="row[performance]" type="number" value="{$row.performance|htmlentities}">
|
||||
<input id="c-performance" readonly data-rule="required" class="form-control" step="0.01" name="row[performance]" type="number" value="{$row.performance|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">
|
||||
|
||||
<div class="radio">
|
||||
<label for="row[audit_status]-0"><input id="row[audit_status]-0" name="row[audit_status]" type="radio" value="0" /> 不通过</label>
|
||||
|
||||
<label for="row[audit_status]-1"><input id="row[audit_status]-1" name="row[audit_status]" type="radio" value="1" checked/> 通过</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Audit_remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea class="form-control" name="row[audit_remark]" >
|
||||
{$row.audit_remark|htmlentities}
|
||||
</textarea>
|
||||
<textarea class="form-control" placeholder="审核备注" name="row[audit_remark]" >{$row.audit_remark|htmlentities}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
239
application/admin/view/orders/configorder/add.html
Normal file
239
application/admin/view/orders/configorder/add.html
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
<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">{:__('Order_no')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_no" data-rule="required" class="form-control" name="row[order_no]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Customer')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-customer" class="form-control" name="row[customer]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-tel" data-rule="required" class="form-control" name="row[tel]" 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="0"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Area_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-area_id" data-rule="required" data-source="area/index" class="form-control selectpage" name="row[area_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Lng')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-lng" class="form-control" step="0.000001" name="row[lng]" type="number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Lat')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-lat" class="form-control" step="0.000001" name="row[lat]" type="number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Work_tel_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-work_tel_id" data-rule="required" data-source="work/tel/index" class="form-control selectpage" name="row[work_tel_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source_shop')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-source_shop" data-rule="required" class="form-control" name="row[source_shop]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-source" data-rule="required" class="form-control" name="row[source]" type="number" value="0">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Source_uid')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-source_uid" class="form-control" name="row[source_uid]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Item_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-item_id" data-rule="required" data-source="item/index" class="form-control selectpage" name="row[item_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Item_title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-item_title" data-rule="required" class="form-control" name="row[item_title]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-detail" class="form-control" name="row[detail]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-remark" class="form-control" name="row[remark]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="c-images" class="form-control" size="50" name="row[images]" type="text">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-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-images"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Plan_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-plan_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[plan_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Coupon_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-coupon_id" data-rule="required" data-source="coupon/index" class="form-control selectpage" name="row[coupon_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Total')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-total" data-rule="required" class="form-control" step="0.01" name="row[total]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-online_amount" class="form-control" step="0.01" name="row[online_amount]" type="number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-offline_amount" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Discount_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-discount_amount" data-rule="required" class="form-control" step="0.01" name="row[discount_amount]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_amount" class="form-control" step="0.01" name="row[refund_amount]" type="number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Real_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-real_amount" data-rule="required" class="form-control" step="0.01" name="row[real_amount]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Performance')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-performance" data-rule="required" class="form-control" step="0.01" name="row[performance]" type="number" value="0.00">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cancel_reason_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cancel_reason_id" data-rule="required" data-source="cancel/reason/index" class="form-control selectpage" name="row[cancel_reason_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cancel_detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cancel_detail" class="form-control" name="row[cancel_detail]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Audit_remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-audit_remark" class="form-control" name="row[audit_remark]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Audit_admin_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-audit_admin_id" data-rule="required" data-source="audit/admin/index" class="form-control selectpage" name="row[audit_admin_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Delete_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-delete_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[delete_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Dispatch_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-dispatch_type" class="form-control" name="row[dispatch_type]" type="number">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Receive_type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-receive_type" class="form-control" name="row[receive_type]" type="number">
|
||||
</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>
|
||||
87
application/admin/view/orders/configorder/edit.html
Normal file
87
application/admin/view/orders/configorder/edit.html
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<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">{:__('Order_no')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_no" readonly data-rule="required" class="form-control" type="text" value="{$row.order_no|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Item_title')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-item_title" data-rule="required" readonly class="form-control" type="text" value="{$row.item_title|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>-->
|
||||
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||
<!-- <div class="input-group">-->
|
||||
<!-- <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">-->
|
||||
<!-- <div class="input-group-addon no-border no-padding">-->
|
||||
<!-- <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
|
||||
<!-- <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-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-images"></span>-->
|
||||
<!-- </div>-->
|
||||
<!-- <ul class="row list-inline faupload-preview" id="p-images"></ul>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Online_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-online_amount" readonly class="form-control" step="0.01" name="row[online_amount]" type="number" value="{$row.online_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Offline_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-offline_amount" class="form-control" step="0.01" name="row[offline_amount]" type="number" value="{$row.offline_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Refund_amount')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-refund_amount" data-rule="required" class="form-control" step="0.01" name="row[refund_amount]" type="number" value="{$row.refund_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Cost')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-cost" data-rule="required" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Performance')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-performance" readonly class="form-control" step="0.01" type="number" value="{$row.performance|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
{notempty name='row.audit_admin_id'}
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Audit_remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-Audit_remark" readonly class="form-control" type="text" value="{$row.audit_remark|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/notempty}
|
||||
|
||||
|
||||
<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>
|
||||
45
application/admin/view/orders/configorder/index.html
Normal file
45
application/admin/view/orders/configorder/index.html
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<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('orders/configorder/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('orders/configorder/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('orders/configorder/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
|
||||
-->
|
||||
<!-- <div class="dropdown btn-group {:$auth->check('orders/configorder/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('orders/configorder/edit')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,27 +1,23 @@
|
|||
<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">{:__('Order_id')}:</label>-->
|
||||
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||
<!-- <input id="c-order_id" data-rule="required" data-field="order_no" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="{$row.order_id|htmlentities}">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-order_id" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="{$row.order_id|htmlentities}">
|
||||
<input id="c-order_id" data-field="order_no" data-rule="required" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
|
||||
{foreach name="typeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_id')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_id" data-rule="required" data-source="worker/index" class="form-control selectpage" name="row[worker_id]" type="text" value="{$row.worker_id|htmlentities}">
|
||||
<input id="c-worker_id" data-rule="required" data-field="name" data-source="workers/worker/index" class="form-control selectpage" name="row[worker_id]" type="text" value="{$row.worker_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
@ -48,42 +44,8 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Is_notice')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
|
||||
<select id="c-is_notice" data-rule="required" class="form-control selectpicker" name="row[is_notice]">
|
||||
{foreach name="isNoticeList" item="vo"}
|
||||
<option value="{$key}" {in name="key" value="$row.is_notice"}selected{/in}>{$vo}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Finish_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-finish_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[finish_time]" type="text" value="{$row.finish_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Admin_user')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-admin_user" data-rule="required" class="form-control" name="row[admin_user]" type="text" value="{$row.admin_user|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{$row.create_time}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Update_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[update_time]" type="text" value="{$row.update_time}">
|
||||
</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">
|
||||
|
|
|
|||
110
application/admin/view/orders/dispatch2/add.html
Normal file
110
application/admin/view/orders/dispatch2/add.html
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<!-- 订单信息标题 -->
|
||||
<div class="row order-header">
|
||||
<div class="col-xs-12">
|
||||
<h2>订单详情</h2>
|
||||
<p><strong>订单编号:</strong> {$row.order_no}</p>
|
||||
<p><strong>顾客信息:</strong> {$row.customer} 电话:{$row.tel}</p>
|
||||
<p><strong>订单来源:</strong> {$row.source_shop} 单号:{$row.source_uid} </p>
|
||||
<p><strong>区域:</strong> {$row.area_name}</p>
|
||||
<p><strong>地址:</strong> {$row.address}</p>
|
||||
<p><strong>订单类型:</strong> {$row.item_title}</p>
|
||||
<p><strong>订单详情:</strong> {$row.detail}</p>
|
||||
<p><strong>订单备注:</strong> {$row.remark}</p>
|
||||
<!-- <p><strong>收款方式:</strong> {$row.receive_type == 1 ? '定金':'全款'}</p>-->
|
||||
<!-- <p><strong>线上收款:</strong> {$row.online_amount}</p>-->
|
||||
</div>
|
||||
<form id="add-form" class="form-horizontal col-xs-12" role="form" data-toggle="validator" method="POST" action="">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4 text-left" style="text-align: left">师傅名称:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_name" disabled data-rule="required" class="form-control" name="row[worker_name]" type="text">
|
||||
<input id="c-worker_id" class="form-control" style="display: none" name="row[worker_id]" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4 text-left" style="text-align: left">{:__('Plan_time')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-update_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[plan_time]" type="text" value="{:date('Y-m-d H:i:s')}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group layer-footer">
|
||||
<label class="control-label col-xs-12 col-sm-4"></label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||
</div>
|
||||
</div>
|
||||
<input style="display: none" class="form-control" name="row[order_id]" type="text" value="{$row->id}">
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-default panel-intro">
|
||||
<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">
|
||||
<h3>师傅选择</h3>
|
||||
<!-- <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>-->
|
||||
|
||||
<form id="select-form" role="form" class="form-horizontal" data-toggle="validator" method="POST" action="">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">区域:</label>
|
||||
<div style="display: inline-block;width: 300px;position: absolute">
|
||||
<input id="c-city-search" data-rule="required" class="form-control" data-toggle="city-picker" value="{$row.area_name}" type="text" />
|
||||
<input id="area_id" style="display: none" class="form-control" name="area_id" hidden type="text" value="{$row.area_id}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="text-align: left;padding-left: 0px;">工种:</label>
|
||||
<div style="width: 300px;display: inline-block;">
|
||||
<input type="text" id="item_id" name="item_id" data-value="{$row.item_title}" value="{$row.item_id}" class="zd-input__inner">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">关键字:</label>
|
||||
<div style="display: inline-block;width: 300px;position: absolute">
|
||||
<input id="keyword" class="form-control" style="width: 100%;height: 32px" placeholder="名称或电话号码搜索" name="keyword" type="text" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<p id="search_btn" class="btn btn-primary">搜索</p>
|
||||
<p id="reset_btn" class="btn btn-primary">清空</p>
|
||||
</form>
|
||||
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<link rel="stylesheet" href="/assets/css/select.css">
|
||||
<style>
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
z-index: 1000;
|
||||
width: 100%;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
background-color: #fff;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
|
||||
margin: 6px 12px;
|
||||
}
|
||||
#select-form .form-group{
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var items = {:json_encode($items); };
|
||||
</script>
|
||||
204
application/admin/view/orders/dispatch2/edit.html
Normal file
204
application/admin/view/orders/dispatch2/edit.html
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
<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">{:__('Order_id')}:</label>-->
|
||||
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||
<!-- <input id="c-order_id" data-rule="required" data-field="order_no" data-source="order/index" class="form-control selectpage" name="row[order_id]" type="text" value="{$row.order_id|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-order_no" readonly class="form-control" data-field="order_no" type="text" value="{$order.order_no|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-customer" readonly class="form-control" type="text" value="{$order.customer|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-tel" readonly class="form-control" type="text" value="{$order.tel|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-address" readonly class="form-control" type="text" value="{$order.area.short_merge_name|htmlentities} {$order.address|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-item_title" readonly class="form-control" type="text" value="{$order.item_title|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order.detail')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-detail" readonly class="form-control" type="text" value="{$order.detail|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{notempty name ='action'}
|
||||
|
||||
<input name="row[action]" type="hidden" value="{$action|htmlentities}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('当前师傅')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input readonly type="text" class="form-control" value="{$row.worker_name|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 readonly type="text" class="form-control" value="{$row.worker_tel|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 readonly type="text" class="form-control" value="{$row.status_text|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 readonly type="text" class="form-control" value="{$order.online_amount|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if $row['is_receipt']==0 }
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('线下收款')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input readonly class="form-control" name="row[total]" type="text" value="无需收款">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
{if $row['is_receipt']==1 }
|
||||
<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-total" data-rule="required" placeholder="请输入线下收款金额" class="form-control" name="row[total]" type="number" min="0" value="{$row.total|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="c-image" class="control-label col-xs-12 col-sm-2">{:__('收款凭据')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="input-group">
|
||||
<input id="c-image" class="form-control" size="35" name="row[image]" type="text" value="">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||
</div>
|
||||
<span class="msg-box n-right"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-image"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/if}
|
||||
|
||||
|
||||
|
||||
<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="input-group">
|
||||
<input id="c-images" class="form-control" size="50" name="row[images]" type="text">
|
||||
<div class="input-group-addon no-border no-padding">
|
||||
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-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-images"></span>
|
||||
</div>
|
||||
<ul class="row list-inline faupload-preview" id="p-images"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<textarea class="form-control" data-rule="required" placeholder="备注" name="row[remark]" >{$row.remark|htmlentities}</textarea>
|
||||
</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">{:__('立即完成任务')}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{else /}
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('当前进度')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input readonly type="text" class="form-control" value="{$row.status_text|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-worker_id" placeholder="输入师傅名称,可手动选择更换" data-rule="required" data-field="name" data-source="workers/worker/index" class="form-control selectpage" name="row[worker_id]" type="text" value="{$row.worker_id|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">{:__('Worker_tel')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-worker_tel" data-rule="required" class="form-control" name="row[worker_tel]" type="text" value="{$row.worker_tel|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2 text-left">{:__('预约时间')}:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-plan_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" value="{$row.plan_time|htmlentities}" data-use-current="true" name="row[plan_time]" type="text" >
|
||||
</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>
|
||||
{/notempty}
|
||||
|
||||
</form>
|
||||
54
application/admin/view/orders/dispatch2/index.html
Normal file
54
application/admin/view/orders/dispatch2/index.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<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('orders/dispatch/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('orders/dispatch/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('orders/dispatch/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||
-->
|
||||
|
||||
<a href="javascript:;" class="btn btn-warning btn-disabled disabled btn-add-normal {:$auth->check('orders/abnormal/add')}?'':'hide'}" title="{:__('创建异常')}" ><i class="fa fa-plus"></i> {:__('创建异常')}</a>
|
||||
|
||||
<a href="javascript:;" class="btn btn-danger btn-cancel-selected btn-disabled disabled {:$auth->check('orders/dispatch2/del')?'':'hide'}" title="{:__('取消任务')}" ><i class="fa fa-trash"></i> {:__('取消任务')}</a>
|
||||
|
||||
|
||||
|
||||
<!-- <div class="dropdown btn-group {:$auth->check('orders/dispatch/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('orders/dispatch2/edit')}"
|
||||
data-operate-del="{:$auth->check('orders/dispatch2/del')}"
|
||||
data-operate-finish="{:$auth->check('orders/dispatch2/finish')}"
|
||||
data-operate-abnormal="{:$auth->check('orders/abnormal/add')}"
|
||||
width="100%">
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -33,24 +33,24 @@
|
|||
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('workers/worker/recyclebin')?'':'hide'}" href="workers/worker/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
|
||||
|
||||
<form id="select-form" style="padding-left: 15px;margin-top: 10px" role="form" class="form-horizontal" data-toggle="validator" method="POST" action="">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">区域:</label>
|
||||
<div style="display: inline-block;width: 300px;position: absolute">
|
||||
<input id="c-city-search" data-rule="required" class="form-control" data-toggle="city-picker" type="text" />
|
||||
<input id="area_id" style="display: none" class="form-control" name="area_id" hidden type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="text-align: left;padding-left: 0px;">工种:</label>
|
||||
<div style="width: 300px;display: inline-block;">
|
||||
<select id="citem" data-live-search="true" title="请选择" name="item_id" class="form-control selectpicker show-tick">
|
||||
<option value="0">不过滤</option>
|
||||
{foreach $items as $item}
|
||||
<option value="{$item['id']}">{$item['title']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">区域:</label>-->
|
||||
<!-- <div style="display: inline-block;width: 300px;position: absolute">-->
|
||||
<!-- <input id="c-city-search" data-rule="required" class="form-control" data-toggle="city-picker" type="text" />-->
|
||||
<!-- <input id="area_id" style="display: none" class="form-control" name="area_id" hidden type="text" />-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-xs-12 col-sm-2" style="text-align: left;padding-left: 0px;">工种:</label>-->
|
||||
<!-- <div style="width: 300px;display: inline-block;">-->
|
||||
<!-- <select id="citem" data-live-search="true" title="请选择" name="item_id" class="form-control selectpicker show-tick">-->
|
||||
<!-- <option value="0">不过滤</option>-->
|
||||
<!-- {foreach $items as $item}-->
|
||||
<!-- <option value="{$item['id']}">{$item['title']}</option>-->
|
||||
<!-- {/foreach}-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="form-group">
|
||||
<label class="col-xs-12 col-sm-2" style="padding-left: 0px;text-align: left">关键字:</label>
|
||||
<div style="display: inline-block;width: 300px;position: absolute">
|
||||
|
|
|
|||
62
application/common/Logic/OrderLogic.php
Normal file
62
application/common/Logic/OrderLogic.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace app\common\Logic;
|
||||
|
||||
use app\admin\model\Order;
|
||||
use app\admin\model\OrderDispatch;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Exception;
|
||||
use think\exception\DbException;
|
||||
use think\Hook;
|
||||
|
||||
class OrderLogic
|
||||
{
|
||||
|
||||
private $OrderModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->OrderModel = new Order();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 任务完成以后,修改订单
|
||||
* $roleInfo = ['role'=>1,'auth'=>$userInfo,'remark'='']
|
||||
*
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function dispachFinishAfter(OrderDispatch $orderDispatch,$roleInfo=[]): void
|
||||
{
|
||||
|
||||
$order = $this->OrderModel->where('id',$orderDispatch->order_id)->find();
|
||||
if($order->status != Order::STATUS_DISPATCHED){
|
||||
throw new Exception('订单状态不允许当前操作');
|
||||
}
|
||||
|
||||
$orderUpdate = [
|
||||
'status' => Order::STATUS_CHECKING
|
||||
];
|
||||
if($orderDispatch->is_receipt == 1){ //要收款,计算确认尾款
|
||||
$offline_amount = $orderDispatch->total;
|
||||
$total = bcadd($order->online_amount,$offline_amount,2);
|
||||
$orderUpdate['offline_amount'] = $offline_amount;
|
||||
$orderUpdate['total'] = $total;
|
||||
}
|
||||
$order->allowField(true)->save($orderUpdate);
|
||||
|
||||
$params['role'] = $roleInfo['role'];
|
||||
$params['auth'] = $roleInfo['auth'];
|
||||
$params['order']= $order;
|
||||
$params['remark'] = $roleInfo['remark'] ?? $orderDispatch->remark;
|
||||
|
||||
Hook::listen('order_change', $params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ return [
|
|||
// 日志保存目录
|
||||
'path' => LOG_PATH,
|
||||
// 日志记录级别
|
||||
'level' => [],
|
||||
'level' => ['log','error'],
|
||||
],
|
||||
// +----------------------------------------------------------------------
|
||||
// | Trace设置 开启 app_trace 后 有效
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ return [
|
|||
'Home' => '首页',
|
||||
'Store' => '插件市场',
|
||||
'Wxapp' => '小程序',
|
||||
'Services' => '服务',
|
||||
'Services' => '服务类目',
|
||||
'Download' => '下载',
|
||||
'Demo' => '演示',
|
||||
'Donation' => '捐赠',
|
||||
|
|
|
|||
|
|
@ -37,4 +37,10 @@ return [
|
|||
'log_write' => [],
|
||||
// 应用结束
|
||||
'app_end' => [],
|
||||
|
||||
|
||||
'order_change' => [
|
||||
'app\\admin\\behavior\\OrderLog',
|
||||
'app\\admin\\behavior\\OrderChangeAfter',
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
define([], function () {
|
||||
require([], function () {
|
||||
//绑定data-toggle=addresspicker属性点击事件
|
||||
console.log('111');
|
||||
|
||||
$(document).on('click', "[data-toggle='addresspicker']", function () {
|
||||
var that = this;
|
||||
|
|
@ -11,18 +12,15 @@ define([], function () {
|
|||
var zoom_id = $(that).data("zoom-id") ? $(that).data("zoom-id") : "";
|
||||
var lat = lat_id ? $("#" + lat_id).val() : '';
|
||||
var lng = lng_id ? $("#" + lng_id).val() : '';
|
||||
var city_code = $("#area_name").val();
|
||||
var city_code = $("#area_id").val();
|
||||
var zoom = zoom_id ? $("#" + zoom_id).val() : '';
|
||||
var url = "/addons/address/index/select";
|
||||
var parmas = (lat && lng) ? '&lat=' + lat + '&lng=' + lng + (input_id ? "&address="
|
||||
+ $("#" + input_id).val() : "") + (zoom ? "&zoom=" + zoom : "") : '';
|
||||
url += parmas;
|
||||
var url = "/addons/address/index/select?1=1";
|
||||
url += (lat && lng) ? 'lat=' + lat + '&lng=' + lng +
|
||||
(input_id ? "&address=" + $("#" + input_id).val() : "")
|
||||
+(zoom ? "&zoom=" + zoom : "") : ''
|
||||
;
|
||||
if (city_code){
|
||||
if (parmas === ''){
|
||||
url += city_code ? "?city_code=" + city_code : "";
|
||||
}else {
|
||||
url += city_code ? "&city_code=" + city_code : "";
|
||||
}
|
||||
url += city_code ? "&city_code=" + city_code : "";
|
||||
}
|
||||
console.log(url);
|
||||
Fast.api.open(url, '位置选择', {
|
||||
|
|
@ -43,7 +41,7 @@ define([], function () {
|
|||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'alioss') {
|
||||
require(['upload'], function (Upload) {
|
||||
|
|
|
|||
|
|
@ -1,62 +1,179 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'auth/admin/index',
|
||||
add_url: 'auth/admin/add',
|
||||
edit_url: 'auth/admin/edit',
|
||||
del_url: 'auth/admin/del',
|
||||
multi_url: 'auth/admin/multi',
|
||||
}
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'jstree'],
|
||||
function ($, undefined, Backend, Table, Form) {
|
||||
$.jstree.core.prototype.get_all_checked = function (full) {
|
||||
var obj = this.get_selected(), i, j;
|
||||
for (i = 0, j = obj.length; i < j; i++) {
|
||||
obj = obj.concat(this.get_node(obj[i]).parents);
|
||||
}
|
||||
obj = $.grep(obj, function (v, i, a) {
|
||||
return v != '#';
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
//在表格内容渲染完成后回调的事件
|
||||
table.on('post-body.bs.table', function (e, json) {
|
||||
$("tbody tr[data-index]", this).each(function () {
|
||||
if (parseInt($("td:eq(1)", this).text()) == Config.admin.id) {
|
||||
$("input[type=checkbox]", this).prop("disabled", true);
|
||||
obj = obj.filter(function (itm, i, a) {
|
||||
return i == a.indexOf(itm);
|
||||
});
|
||||
return full ? $.map(obj, $.proxy(function (i) {
|
||||
return this.get_node(i);
|
||||
}, this)) : obj;
|
||||
};
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'auth/admin/index',
|
||||
add_url: 'auth/admin/add',
|
||||
edit_url: 'auth/admin/edit',
|
||||
del_url: 'auth/admin/del',
|
||||
multi_url: 'auth/admin/multi',
|
||||
area_url: 'auth/admin/setArea',
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'username', title: __('Username')},
|
||||
{field: 'nickname', title: __('Nickname')},
|
||||
{field: 'groups_text', title: __('Group'), operate:false, formatter: Table.api.formatter.label},
|
||||
{field: 'email', title: __('Email')},
|
||||
{field: 'mobile', title: __('Mobile')},
|
||||
{field: 'status', title: __("Status"), searchList: {"normal":__('Normal'),"hidden":__('Hidden')}, formatter: Table.api.formatter.status},
|
||||
{field: 'logintime', title: __('Login time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: function (value, row, index) {
|
||||
if(row.id == Config.admin.id){
|
||||
return '';
|
||||
}
|
||||
return Table.api.formatter.operate.call(this, value, row, index);
|
||||
}}
|
||||
var table = $("#table");
|
||||
|
||||
//在表格内容渲染完成后回调的事件
|
||||
table.on('post-body.bs.table', function (e, json) {
|
||||
$("tbody tr[data-index]", this).each(function () {
|
||||
if (parseInt($("td:eq(1)", this).text()) == Config.admin.id) {
|
||||
$("input[type=checkbox]", this).prop("disabled", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
columns: [
|
||||
[
|
||||
{field: 'state', checkbox: true,},
|
||||
{field: 'id', title: 'ID'},
|
||||
{field: 'username', title: __('Username')},
|
||||
{field: 'nickname', title: __('Nickname')},
|
||||
{
|
||||
field: 'groups_text',
|
||||
title: __('Group'),
|
||||
operate: false,
|
||||
formatter: Table.api.formatter.label
|
||||
},
|
||||
{field: 'email', title: __('Email')},
|
||||
{field: 'mobile', title: __('Mobile')},
|
||||
{
|
||||
field: 'status',
|
||||
title: __("Status"),
|
||||
searchList: {"normal": __('Normal'), "hidden": __('Hidden')},
|
||||
formatter: Table.api.formatter.status
|
||||
},
|
||||
{
|
||||
field: 'logintime',
|
||||
title: __('Login time'),
|
||||
formatter: Table.api.formatter.datetime,
|
||||
operate: 'RANGE',
|
||||
addclass: 'datetimerange',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'operate', title: __('Operate'), table: table,
|
||||
events: Table.api.events.operate, formatter: function (value, row, index) {
|
||||
if (row.id == Config.admin.id) {
|
||||
return '';
|
||||
}
|
||||
return Table.api.formatter.operate.call(this, value, row, index);
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
name: "setArea",
|
||||
text: "配置管理区域",
|
||||
title: "区域",
|
||||
url: 'auth/admin/area',
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-warning btn-dialog',
|
||||
//classname:"btn-view btn-dialog",
|
||||
icon: 'fa fa-add',
|
||||
refresh: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
]
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
edit: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
},
|
||||
add: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
edit: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
area: function () {
|
||||
Form.api.bindevent($("form[role=form]"), null, null, function () {
|
||||
if ($("#treeview").length > 0) {
|
||||
var r = $("#treeview").jstree("get_all_checked");
|
||||
$("input[name='row[area_ids]']").val(r.join(','));
|
||||
}
|
||||
return true;
|
||||
});
|
||||
//渲染权限节点树
|
||||
//销毁已有的节点树
|
||||
$("#treeview").jstree("destroy");
|
||||
|
||||
$.ajax({
|
||||
url: "auth/admin/areaget", // 你的 API 地址
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
data: {
|
||||
user_id:$('#user_id').val()
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data);
|
||||
Controller.api.rendertree(data);
|
||||
},
|
||||
error: function () {
|
||||
console.error("请求失败");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//全选和展开
|
||||
$(document).on("click", "#checkall", function () {
|
||||
$("#treeview").jstree($(this).prop("checked") ? "check_all" : "uncheck_all");
|
||||
});
|
||||
$(document).on("click", "#expandall", function () {
|
||||
$("#treeview").jstree($(this).prop("checked") ? "open_all" : "close_all");
|
||||
});
|
||||
$("select[name='row[pid]']").trigger("change");
|
||||
},
|
||||
api: {
|
||||
rendertree: function (content) {
|
||||
$("#treeview")
|
||||
.on('redraw.jstree', function (e) {
|
||||
$(".layer-footer").attr("domrefresh", Math.random());
|
||||
})
|
||||
.jstree({
|
||||
"themes": {"stripes": true},
|
||||
"checkbox": {
|
||||
"keep_selected_style": false,
|
||||
},
|
||||
"types": {
|
||||
"root": {
|
||||
"icon": "fa fa-folder-open",
|
||||
},
|
||||
"menu": {
|
||||
"icon": "fa fa-folder-open",
|
||||
},
|
||||
"file": {
|
||||
"icon": "fa fa-file-o",
|
||||
}
|
||||
},
|
||||
"plugins": ["checkbox", "types"],
|
||||
"core": {
|
||||
'check_callback': true,
|
||||
"data": content
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','cascader'], function
|
|||
index_url: 'order/index' + location.search,
|
||||
add_url: 'order/add',
|
||||
edit_url: 'order/edit',
|
||||
del_url: 'order/del',
|
||||
//del_url: 'order/del',
|
||||
multi_url: 'order/multi',
|
||||
import_url: 'order/import',
|
||||
push_url: 'order/status',
|
||||
|
|
@ -129,6 +129,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','cascader'], function
|
|||
table: table,
|
||||
events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
align:"left",
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
|
|
@ -168,30 +169,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','cascader'], function
|
|||
},
|
||||
refresh:true,
|
||||
},
|
||||
{
|
||||
name:"income",
|
||||
text:"新增收款",
|
||||
title:"新增收款",
|
||||
classname:"btn-view btn-dialog",
|
||||
icon:'fa fa-money',
|
||||
url: function(row){
|
||||
return 'orders/income/add?order_id='+row.id;
|
||||
},
|
||||
dropdown:"更多",
|
||||
visible:function(row){
|
||||
return true;
|
||||
},
|
||||
refresh:true,
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text:"取消订单",
|
||||
title:"取消订单",
|
||||
icon: 'fa fa-trash',
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-danger btn-delone',
|
||||
dropdown:"更多",
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
Form.events.selectpage(form);
|
||||
});
|
||||
|
||||
$.fn.bootstrapTable.locales[Table.defaults.locale]['formatSearch'] = function(){return "订单号/客户电话/客户姓名";};
|
||||
$.fn.bootstrapTable.locales[Table.defaults.locale]['formatSearch'] = function(){return "订单编号/客户电话/客户姓名";};
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
|
|
@ -44,8 +44,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
{field: 'order.worker_name', title: __('Order.worker_name'), operate: 'LIKE'},
|
||||
{field: 'order.worker_tel', title: __('Order.worker_tel'), operate: 'LIKE'},
|
||||
// {field: 'order.worker_name', title: __('Order.worker_name'), operate: 'LIKE'},
|
||||
// {field: 'order.worker_tel', title: __('Order.worker_tel'), operate: 'LIKE'},
|
||||
//{field: 'handle_admin_id', title: __('Handle_admin_id')},
|
||||
{field: 'handle_admin_user', title: __('Handle_admin_user'), operate: 'LIKE'},
|
||||
{field: 'handle_time', title: __('Handle_time'), operate:false, addclass:'datetimerange', autocomplete:false},
|
||||
|
|
@ -56,17 +56,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
buttons:[
|
||||
{
|
||||
name:"detail",
|
||||
text:"",
|
||||
title:"详情",
|
||||
classname:"btn btn-xs btn-info btn-view btn-dialog",
|
||||
icon:'fa fa-eye',
|
||||
url: 'orders/abnormal/edit/'
|
||||
|
||||
}
|
||||
]
|
||||
// buttons:[
|
||||
// {
|
||||
// name:"detail",
|
||||
// text:"",
|
||||
// title:"详情",
|
||||
// classname:"btn btn-xs btn-info btn-view btn-dialog",
|
||||
// icon:'fa fa-eye',
|
||||
// url: 'orders/abnormal/edit/'
|
||||
//
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
|||
85
public/assets/js/backend/orders/configorder.js
Normal file
85
public/assets/js/backend/orders/configorder.js
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'orders/configorder/index' + location.search,
|
||||
//add_url: 'orders/configorder/add',
|
||||
edit_url: 'orders/configorder/edit',
|
||||
// del_url: 'orders/configorder/del',
|
||||
multi_url: 'orders/configorder/multi',
|
||||
import_url: 'orders/configorder/import',
|
||||
table: 'order',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'order_no', title: __('Order_no'), operate: 'LIKE'},
|
||||
// {field: 'customer', title: __('Customer'), operate: 'LIKE'},
|
||||
//{field: 'tel', title: __('Tel'), operate: 'LIKE'},
|
||||
|
||||
//{field: 'dispatch.worker_name', title: __('Dispatch.worker_name'), operate: 'LIKE'},
|
||||
//{field: 'dispatch.worker_tel', title: __('Dispatch.worker_tel'), operate: 'LIKE'},
|
||||
|
||||
{field: 'dispatch.admin_user', title: __('Dispatch.admin_user'), operate: 'LIKE'},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"30":__('Status 30'),"40":__('Status 40'),"50":__('Status 50'),"60":__('Status 60'),"-10":__('Status -10')}, formatter: Table.api.formatter.status},
|
||||
|
||||
// {field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'source_shop', title: __('Source_shop'), operate: 'LIKE'},
|
||||
// {field: 'source', title: __('Source')},
|
||||
// {field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'},
|
||||
{field: 'item_title', title: __('Item_title'), operate: 'LIKE'},
|
||||
|
||||
{field: 'total', title: __('Total'), operate:'BETWEEN'},
|
||||
{field: 'online_amount', title: __('Online_amount'), operate:'BETWEEN'},
|
||||
{field: 'offline_amount', title: __('Offline_amount'), operate:'BETWEEN'},
|
||||
|
||||
{field: 'refund_amount', title: __('Refund_amount'), operate:'BETWEEN'},
|
||||
{field: 'real_amount', title: __('Real_amount'), operate:'BETWEEN'},
|
||||
{field: 'cost', title: __('Cost'), operate:'BETWEEN'},
|
||||
{field: 'performance', title: __('Performance'), operate:'BETWEEN'},
|
||||
|
||||
// {field: 'dispatch_type', title: __('Dispatch_type')},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
|
||||
|
||||
// {field: 'dispatch.finish_time', title: __('Dispatch.finish_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, 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;
|
||||
});
|
||||
238
public/assets/js/backend/orders/dispatch2.js
Normal file
238
public/assets/js/backend/orders/dispatch2.js
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($, undefined, Backend, Table, Form) {
|
||||
|
||||
var Controller = {
|
||||
index: function () {
|
||||
// 初始化表格参数配置
|
||||
Table.api.init({
|
||||
extend: {
|
||||
index_url: 'orders/dispatch2/index' + location.search,
|
||||
//add_url: 'orders/dispatch/add',
|
||||
edit_url: 'orders/dispatch2/edit',
|
||||
//del_url: 'orders/dispatc2h/del',
|
||||
multi_url: 'orders/dispatch2/multi',
|
||||
import_url: 'orders/dispatch2/import',
|
||||
table: 'order_dispatch',
|
||||
}
|
||||
});
|
||||
|
||||
var table = $("#table");
|
||||
|
||||
// 初始化表格
|
||||
table.bootstrapTable({
|
||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||
pk: 'id',
|
||||
sortName: 'id',
|
||||
fixedColumns: true,
|
||||
fixedRightNumber: 1,
|
||||
columns: [
|
||||
[
|
||||
//{checkbox: true},
|
||||
{checkbox: true, formatter: function (value, row, index) {
|
||||
// 根据 is_selectable 字段控制是否禁用
|
||||
// return row.is_selectable ? '' : {disabled: true};
|
||||
if(row.is_disabled === true){
|
||||
return {
|
||||
disabled: true
|
||||
};
|
||||
}
|
||||
return '';
|
||||
}},
|
||||
|
||||
{field: 'id', title: __('Id')},
|
||||
//{field: 'order_id', title: __('Order_id')},
|
||||
|
||||
{field: 'order.order_no', title: __('Order.order_no'), operate: 'LIKE'},
|
||||
|
||||
|
||||
// {field: 'worker_id', title: __('Worker_id')},
|
||||
{field: 'worker_name', title: __('Worker_name'), operate: 'LIKE'},
|
||||
{field: 'worker_tel', title: __('Worker_tel'), operate: 'LIKE'},
|
||||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1')}, formatter: Table.api.formatter.normal},
|
||||
|
||||
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"10":__('Status 10'),"20":__('Status 20'),"25":__('Status 25'),"30":__('Status 30'),"60":__('Status 60'),"-10":__('Status -10'),
|
||||
//"-20":__('Status -20'),
|
||||
"-30":__('Status -30')},
|
||||
formatter: Table.api.formatter.status,
|
||||
custom:{25:"red"}
|
||||
},
|
||||
|
||||
{field: 'plan_time', title: __('Plan_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false,
|
||||
formatter:function(value,row,index){
|
||||
if(row.status == 25){
|
||||
return' <span style="color:red;font-weight: bold">'+value+'</span>';
|
||||
}else{
|
||||
return value;
|
||||
}
|
||||
}},
|
||||
|
||||
|
||||
{field: 'order.source_shop', title: __('Order.source_shop'), operate: 'LIKE'},
|
||||
// {field: 'order.source', title: __('Order.source')},
|
||||
{field: 'order.customer', title: __('Order.customer'), operate: 'LIKE'},
|
||||
{field: 'order.tel', title: __('Order.tel'), operate: 'LIKE'},
|
||||
{field: 'order.address', title: __('Order.address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'order.item_title', title: __('Order.item_title'), operate: 'LIKE'},
|
||||
{field: 'order.detail', title: __('Order.detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
{field: 'order.images', title: __('Order.images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||
|
||||
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
|
||||
// {field: 'is_notice', title: __('Is_notice'), searchList: {"0":__('Is_notice 0'),"1":__('Is_notice 1')}, formatter: Table.api.formatter.normal},
|
||||
// {field: 'admin_id', title: __('Admin_id')},
|
||||
{field: 'admin_user', title: __('Admin_user'), operate: 'LIKE'},
|
||||
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'finish_time', title: __('Finish_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||
|
||||
align:'left',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text:"修改",
|
||||
title:"",
|
||||
icon: 'fa fa-pencil',
|
||||
//title: __('Edit'),
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-info btn-editone',
|
||||
visible:function(row){
|
||||
if(row.btn_edit){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'finish',
|
||||
text:"完成",
|
||||
title:"完成",
|
||||
icon: 'fa fa-check',
|
||||
url: 'orders/dispatch2/finish',
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
classname: 'btn btn-xs btn-success btn-dialog',
|
||||
visible:function(row){
|
||||
if(row.btn_finished){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
Table.api.bindevent(table);
|
||||
|
||||
|
||||
// 获取选中项
|
||||
$(document).on("click", ".btn-cancel-selected", function () {
|
||||
//Layer.alert(JSON.stringify(Table.api.selecteddata(table)));
|
||||
|
||||
// 获取选中项的 ID
|
||||
var selectedData = Table.api.selecteddata(table);
|
||||
var selectedIds = selectedData.map(item => item.id); // 假设每行数据有 `id` 字段
|
||||
|
||||
if (selectedIds.length === 0) {
|
||||
Layer.alert("请先选择至少一项数据!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 弹出确认框并要求输入文本
|
||||
Layer.prompt({
|
||||
title: "请输入操作理由",
|
||||
formType: 2, // 多行文本输入框
|
||||
}, function (inputValue, index) {
|
||||
if (!inputValue) {
|
||||
Layer.alert("输入内容不能为空!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 关闭弹出框
|
||||
Layer.close(index);
|
||||
|
||||
//这里可以加入 Ajax 请求处理逻辑
|
||||
$.ajax({
|
||||
url: 'orders/dispatch2/del',
|
||||
type: 'POST',
|
||||
data: {
|
||||
ids: selectedIds,
|
||||
reason: inputValue,
|
||||
},
|
||||
success: function (response,data) {
|
||||
if(response.code == 1){
|
||||
// 成功提示
|
||||
Toastr.success(data.message || "操作成功!");
|
||||
// 刷新表格
|
||||
table.bootstrapTable('refresh');
|
||||
}else{
|
||||
Toastr.error(response.msg || "操作失败!");
|
||||
}
|
||||
return;
|
||||
},
|
||||
error: function () {
|
||||
Toastr.error("操作失败,请重试!");
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// 获取选中项
|
||||
$(document).on("click", ".btn-add-normal", function () {
|
||||
// 获取选中项的 ID
|
||||
var selectedData = Table.api.selecteddata(table);
|
||||
var selectedIds = selectedData.map(item => item.id); // 假设每行数据有 `id` 字段
|
||||
|
||||
if (selectedIds.length === 0) {
|
||||
Layer.alert("请先选择至少一项数据!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(selectedIds.length > 1){
|
||||
Layer.alert("创建异常,一次只能选择一条订单!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 拼接 ids 到 URL 后面
|
||||
var url = 'orders/abnormal/add?ids=' + selectedIds.join(',');
|
||||
|
||||
// 打开弹窗
|
||||
Fast.api.open(
|
||||
url,
|
||||
"新增订单异常", // 弹窗标题
|
||||
{
|
||||
area: ['800px', '600px'] // 设置弹窗宽度和高度,可以根据需求调整
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
add: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
finish: function () {
|
||||
Controller.api.bindevent();
|
||||
},
|
||||
api: {
|
||||
bindevent: function () {
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
}
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
});
|
||||
|
|
@ -35,7 +35,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'updatetime', title: __('Updatetime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true, visible: false},
|
||||
{field: 'weigh', title: __('Weigh')},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'),
|
||||
table: table, events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
}
|
||||
]
|
||||
],
|
||||
pagination: false,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'jointime', title: __('Jointime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
|
||||
{field: 'joinip', title: __('Joinip'), formatter: Table.api.formatter.search},
|
||||
{field: 'status', title: __('Status'), formatter: Table.api.formatter.status, searchList: {normal: __('Normal'), hidden: __('Hidden')}},
|
||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||
{field: 'operate', title: __('Operate'), table: table,
|
||||
events: Table.api.events.operate,
|
||||
formatter: Table.api.formatter.operate,
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
define(['jquery', 'bootstrap', 'backend', 'table', 'form','jstree'], function ($, undefined, Backend, Table, Form) {
|
||||
define(['jquery', 'bootstrap', 'backend', 'table', 'form','jstree'],
|
||||
function ($, undefined, Backend, Table, Form) {
|
||||
$.jstree.core.prototype.get_all_checked = function (full) {
|
||||
var obj = this.get_selected(), i, j;
|
||||
for (i = 0, j = obj.length; i < j; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user