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;
|
||||
Db::startTrans();
|
||||
$order = model('order')->get($params['order_id'], ['dispatch']);
|
||||
$order = model('order')->get($params['order_id']);
|
||||
if (!$order) {
|
||||
$this->error('Not Find');
|
||||
}
|
||||
|
|
@ -717,9 +717,10 @@ class Order extends Backend
|
|||
|
||||
$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->cancelOrderDispatch($order->dispatch, $this->auth, '订单被取消', false);
|
||||
$orderLogic->cancelOrderDispatch($dispatch, $this->auth, '订单被取消', false);
|
||||
}
|
||||
//日志
|
||||
$hookparams['order'] = $order;
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ class Configorder extends Backend
|
|||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
$list = $this->model
|
||||
->tab(Order::TAB_SETTING)
|
||||
->auth($this->auth,'dispatch_admin_id')
|
||||
->areaauth($this->auth)
|
||||
//->auth($this->auth,'dispatch_admin_id')
|
||||
//->areaauth($this->auth)
|
||||
->with(['dispatchadmin'])
|
||||
->where($where)
|
||||
->order($sort, $order)
|
||||
|
|
|
|||
|
|
@ -225,12 +225,12 @@ class Order extends Model
|
|||
|
||||
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()
|
||||
{
|
||||
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: "更多",
|
||||
visible: function (row) {
|
||||
return true;
|
||||
//return true;
|
||||
if (row.orderb.status >= 0 && row.orderb.status < 60 && row.status >=0 && row.status < 60) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user