feat: 添加订单核销功能
This commit is contained in:
parent
950cd2fe3a
commit
00a72c0b71
@ -388,11 +388,15 @@ class OrderLogic extends BaseLogic
|
|||||||
'status' => OrderEnum::RECEIVED_GOODS,
|
'status' => OrderEnum::RECEIVED_GOODS,
|
||||||
'is_writeoff' => OrderEnum::IS_OK,
|
'is_writeoff' => OrderEnum::IS_OK,
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
|
'store_id' => $params['store_id'],
|
||||||
|
'staff_id' => $params['staff_id']??0,
|
||||||
], ['id' => $data['id']]);
|
], ['id' => $data['id']]);
|
||||||
(new StoreOrderCartInfo())->update([
|
(new StoreOrderCartInfo())->update([
|
||||||
'verify_code'=>$params['verify_code'].'-1',
|
'verify_code'=>$params['verify_code'].'-1',
|
||||||
'writeoff_time' => time(),
|
'writeoff_time' => time(),
|
||||||
'is_writeoff' => YesNoEnum::YES,
|
'is_writeoff' => YesNoEnum::YES,
|
||||||
|
'store_id' => $params['store_id'],
|
||||||
|
'staff_id' => $params['staff_id']??0,
|
||||||
'update_time' => time(),
|
'update_time' => time(),
|
||||||
], ['oid' => $data['id']]);
|
], ['oid' => $data['id']]);
|
||||||
$financeFlow = (new StoreFinanceFlowLogic)->getStoreOrder($data['id'], $data['store_id']);
|
$financeFlow = (new StoreFinanceFlowLogic)->getStoreOrder($data['id'], $data['store_id']);
|
||||||
|
@ -151,6 +151,9 @@ class StoreOrderController extends BaseAdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建订单
|
||||||
|
*/
|
||||||
public function createOrder()
|
public function createOrder()
|
||||||
{
|
{
|
||||||
$cartId = (array)$this->request->post('cart_id', []);
|
$cartId = (array)$this->request->post('cart_id', []);
|
||||||
@ -216,6 +219,9 @@ class StoreOrderController extends BaseAdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新支付
|
||||||
|
*/
|
||||||
public function pay()
|
public function pay()
|
||||||
{
|
{
|
||||||
$order_id = $this->request->post('order_id');
|
$order_id = $this->request->post('order_id');
|
||||||
@ -273,6 +279,9 @@ class StoreOrderController extends BaseAdminController
|
|||||||
return $this->fail('支付失败');
|
return $this->fail('支付失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单核销
|
||||||
|
*/
|
||||||
public function writeoff_order()
|
public function writeoff_order()
|
||||||
{
|
{
|
||||||
$params = (new OrderValidate())->post()->goCheck('check');
|
$params = (new OrderValidate())->post()->goCheck('check');
|
||||||
@ -280,6 +289,8 @@ class StoreOrderController extends BaseAdminController
|
|||||||
if (empty($count)) {
|
if (empty($count)) {
|
||||||
return $this->fail('无该核销码请检查');
|
return $this->fail('无该核销码请检查');
|
||||||
}
|
}
|
||||||
|
$params['store_id']=$this->adminInfo['store_id'];
|
||||||
|
$params['staff_id']=$this->adminId;
|
||||||
$res = OrderLogic::writeOff($params);
|
$res = OrderLogic::writeOff($params);
|
||||||
if ($res) {
|
if ($res) {
|
||||||
return $this->success('核销成功');
|
return $this->success('核销成功');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user