@@ -58,6 +58,9 @@ class OrderController extends BaseController
try {
$all = OrderClass::getAllByCondition(['id' => ['in', $arr]], null, '*', null, true);
foreach ($all as $order) {
+ if ($order->book == 1) {
+ util::fail('有预订单,不能一起发货');
+ }
if ($order->mainId != $this->mainId) {
util::fail('不是你的订单哦');
}
@@ -291,7 +291,6 @@ class OrderClass extends BaseClass
$order->actPrice = $currentPrice;
$order->realPrice = $currentPrice;
$order->stockChange = 1;
- $order->status = self::ORDER_STATUS_COMPLETE;
$order->save();
$bookPrice = $order->bookPrice ?? 0;
@@ -41,6 +41,9 @@ class OrderService extends BaseService
public static function arrival($order, $data)
{
+ $params = ['fhType' => 0,'fhWl' => '','fhWlNo' => '',];
+ OrderClass::orderSend($order, $params);
+
//product [{"productId":"3674","num":0,"price":1}]
$product = $data['product'] ?? '';
if (empty($product)) {
@@ -337,7 +337,6 @@ class PurchaseClass extends BaseClass
$cg->actPrice = $currentPrice;
$cg->realPrice = $currentPrice;
$cg->stockChange = 1;
- $cg->status = self::STATUS_COMPLETE;
$cg->save();
$mainId = $cg->mainId ?? 0;
@@ -67,6 +67,10 @@ class OrderController extends Controller
$transaction = $connection->beginTransaction();
$orderSn = $cg['orderSn'] ?? '';
$id = $cg['id'] ?? 0;
+ //预订单不需要自动确认收货
+ if (isset($cg['book']) && $cg['book'] == 1) {
+ continue;
$info = PurchaseClass::getById($id, true);
if (!empty($info)) {