|
|
@@ -196,6 +196,10 @@ class OrderMainService |
|
|
|
} else { |
|
|
|
$subOrderDao = new OrderItemDao(); |
|
|
|
} |
|
|
|
$subOrderRe = $subOrderDao->getInfoById($param['id']); |
|
|
|
if (!$subOrderRe['flag']) { |
|
|
|
return $subOrderRe; |
|
|
|
} |
|
|
|
$subOrderDao->delById($param['id']); |
|
|
|
//删除采购单 |
|
|
|
$purchaseDao = new PurchaseDao(); |
|
|
@@ -203,6 +207,9 @@ class OrderMainService |
|
|
|
//删除每日采购单价格 |
|
|
|
$purchasePriceDao = new PurchasePriceDao(); |
|
|
|
$purchasePriceDao->deleteBySubOrderId($param['id']); |
|
|
|
//重新计算订单总金额 |
|
|
|
$orderMainDao = new OrderMainDao(); |
|
|
|
$orderMainDao->setOrderAmount($subOrderRe['data']['order_id']); |
|
|
|
return Util::returnArrSu(); |
|
|
|
}catch (Exception $e){ |
|
|
|
return Util::returnArrEr("删除子订单失败:".$e->getMessage()); |
|
|
|