Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
403ff850e8
|
|
@ -704,7 +704,7 @@ class Order extends Backend
|
||||||
|
|
||||||
$result = false;
|
$result = false;
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
$order = model('order')->get($params['order_id'], ['dispatch']);
|
$order = model('order')->get($params['order_id']);
|
||||||
if (!$order) {
|
if (!$order) {
|
||||||
$this->error('Not Find');
|
$this->error('Not Find');
|
||||||
}
|
}
|
||||||
|
|
@ -717,9 +717,10 @@ class Order extends Backend
|
||||||
|
|
||||||
$result = $order->allowField(true)->save($params);
|
$result = $order->allowField(true)->save($params);
|
||||||
|
|
||||||
if (!empty($order->dispatch->id)) {
|
$dispatch = OrderDispatch::where('order_id', $order->id)->where('status','>',0)->find();
|
||||||
|
if (!empty($dispatch)) {
|
||||||
$orderLogic = new OrderLogic();
|
$orderLogic = new OrderLogic();
|
||||||
$orderLogic->cancelOrderDispatch($order->dispatch, $this->auth, '订单被取消', false);
|
$orderLogic->cancelOrderDispatch($dispatch, $this->auth, '订单被取消', false);
|
||||||
}
|
}
|
||||||
//日志
|
//日志
|
||||||
$hookparams['order'] = $order;
|
$hookparams['order'] = $order;
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,8 @@ class Configorder extends Backend
|
||||||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||||
$list = $this->model
|
$list = $this->model
|
||||||
->tab(Order::TAB_SETTING)
|
->tab(Order::TAB_SETTING)
|
||||||
->auth($this->auth,'dispatch_admin_id')
|
//->auth($this->auth,'dispatch_admin_id')
|
||||||
->areaauth($this->auth)
|
//->areaauth($this->auth)
|
||||||
->with(['dispatchadmin'])
|
->with(['dispatchadmin'])
|
||||||
->where($where)
|
->where($where)
|
||||||
->order($sort, $order)
|
->order($sort, $order)
|
||||||
|
|
|
||||||
|
|
@ -225,12 +225,12 @@ class Order extends Model
|
||||||
|
|
||||||
public function dispatch()
|
public function dispatch()
|
||||||
{
|
{
|
||||||
return $this->hasOne(OrderDispatch::class, 'order_id', 'id', [], 'LEFT')->setEagerlyType(0)->where('fa_order_dispatch.status',OrderDispatch::STATUS_FINISH);
|
return $this->hasOne(OrderDispatch::class, 'order_id', 'id', [], 'LEFT')->setEagerlyType(0)->where('fa_order_dispatch.status','>',0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function dispatch2()
|
public function dispatch2()
|
||||||
{
|
{
|
||||||
return $this->hasOne(OrderDispatch::class, 'order_id', 'id', [], 'LEFT')->setEagerlyType(1)->where('fa_order_dispatch.status',OrderDispatch::STATUS_FINISH);
|
return $this->hasOne(OrderDispatch::class, 'order_id', 'id', [], 'LEFT')->setEagerlyType(1)->where('fa_order_dispatch.status','>',0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
|
||||||
|
|
||||||
dropdown: "更多",
|
dropdown: "更多",
|
||||||
visible: function (row) {
|
visible: function (row) {
|
||||||
return true;
|
//return true;
|
||||||
if (row.orderb.status >= 0 && row.orderb.status < 60 && row.status >=0 && row.status < 60) {
|
if (row.orderb.status >= 0 && row.orderb.status < 60 && row.status >=0 && row.status < 60) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user