订单核销修改
This commit is contained in:
parent
b6e6b97a50
commit
b61a99b060
@ -359,7 +359,7 @@ class OrderController extends BaseApiController
|
||||
if ($res) {
|
||||
return $this->success('核销成功');
|
||||
}
|
||||
return $this->fail('核销失败');
|
||||
return $this->fail('核销失败'.OrderLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,7 +49,7 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->each(function($item){
|
||||
$item['goods_list']=StoreOrderCartInfo::where('oid',$item['id'])->with('goodsName')->field('product_id,cart_num')->limit(3)->select();
|
||||
$item['goods_list']=StoreOrderCartInfo::where('oid',$item['id'])->with('goodsName')->field('product_id,cart_num,verify_code,is_writeoff,writeoff_time')->limit(3)->select();
|
||||
$item['goods_count']=count(explode(',',$item['cart_id']));
|
||||
})
|
||||
->toArray();
|
||||
|
@ -8,7 +8,6 @@ use app\common\enum\YesNoEnum;
|
||||
use app\common\logic\BaseLogic;
|
||||
use app\common\logic\CapitalFlowLogic;
|
||||
use app\common\logic\StoreFinanceFlowLogic;
|
||||
use app\common\model\merchant\Merchant;
|
||||
use app\common\model\order\Cart;
|
||||
use app\common\model\store_branch_product\StoreBranchProduct;
|
||||
use app\common\model\store_order\StoreOrder;
|
||||
@ -19,7 +18,6 @@ use app\common\model\store_product_unit\StoreProductUnit;
|
||||
use app\common\model\system_store\SystemStore;
|
||||
use app\common\model\user\User;
|
||||
use app\common\model\user\UserAddress;
|
||||
use app\Request;
|
||||
use support\Log;
|
||||
use taoser\exception\ValidateException;
|
||||
use think\Exception;
|
||||
@ -101,10 +99,6 @@ class OrderLogic extends BaseLogic
|
||||
if (!$orderInfo) {
|
||||
return false;
|
||||
}
|
||||
// `delivery_name`快递名称/送货人姓名',
|
||||
// `delivery_code`'快递公司编码',
|
||||
// `delivery_type` '发货类型',
|
||||
// `delivery_id'快递单号/手机号',
|
||||
$_order = $orderInfo['order'];
|
||||
$_order['deduction_price'] = 0;
|
||||
$_order['uid'] = request()->userId;
|
||||
@ -113,7 +107,10 @@ class OrderLogic extends BaseLogic
|
||||
$_order['mobile'] = $user['mobile'];
|
||||
$_order['pay_type'] = $orderInfo['order']['pay_type'];
|
||||
$_order['verify_code'] = $verify_code;
|
||||
|
||||
if (isset($params['reservation_time'])) {
|
||||
$_order['reservation_time'] = $params['reservation_time'];
|
||||
$_order['reservation'] = YesNoEnum::YES;
|
||||
}
|
||||
if ($addressId > 0) {
|
||||
$address = UserAddress::where(['id' => $addressId, 'uid' => Request()->userId])->find();
|
||||
if ($address) {
|
||||
@ -122,12 +119,6 @@ class OrderLogic extends BaseLogic
|
||||
$_order['user_address'] = $address['detail'];
|
||||
}
|
||||
}
|
||||
// if($params['pay_type']==PayEnum::WECHAT_PAY_BARCODE){
|
||||
// $_order['source']=1;
|
||||
// }
|
||||
// if($params['pay_type']==PayEnum::CASH_PAY){
|
||||
// $_order['money']=$_order['total'];
|
||||
// }
|
||||
|
||||
Db::startTrans();
|
||||
try {
|
||||
|
@ -12,7 +12,7 @@ class CapitalFlowLogic extends BaseLogic
|
||||
|
||||
public function __construct($obj, $type = 'user')
|
||||
{
|
||||
if (isset($type)) {
|
||||
if (isset($type) && $type == 'user') {
|
||||
$this->user = $obj;
|
||||
} else {
|
||||
$this->store = $obj;
|
||||
@ -85,7 +85,7 @@ class CapitalFlowLogic extends BaseLogic
|
||||
public function storeIncome($category, $linkType, $linkId, $amount, $mark = '')
|
||||
{
|
||||
$model = new CapitalFlow();
|
||||
$model->store_id = $this->store['store_id'];
|
||||
$model->store_id = $this->store['id'];
|
||||
$model->category = $category;
|
||||
$model->link_type = $linkType;
|
||||
$model->link_id = $linkId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user