|
|
@@ -19,6 +19,22 @@ class StockInOrderClass extends BaseClass
|
|
|
const ACTION_CONFIRM = 'confirm'; //直接入库
|
|
|
public static $baseFile = '\bizGhs\order\models\StockInOrder';
|
|
|
|
|
|
+
|
|
|
+ //2021.1.25 linqh 订单列表
|
|
|
+ public static function getOrderList($where)
|
|
|
+ {
|
|
|
+ $data = self::getList('*', $where, 'addTime DESC');
|
|
|
+ $list = isset($data['list']) && !empty($data['list']) ? $data['list'] : [];
|
|
|
+ if (empty($list)) {
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+ $data['list'] = $list;
|
|
|
+ $data['list'] = self::groupAdminList($list);
|
|
|
+
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//入库 (状态在待入库中 )linqh 2021.1.23
|
|
|
public static function addOrder($outOrderData)
|
|
|
{
|
|
|
@@ -115,15 +131,12 @@ class StockInOrderClass extends BaseClass
|
|
|
$transaction->rollBack();
|
|
|
util::fail("订单异常");
|
|
|
}
|
|
|
-
|
|
|
foreach ($itemInfo as $v){
|
|
|
ProductClass::addStockByItemNum($v['productId'],$v['itemNum']);
|
|
|
}
|
|
|
-
|
|
|
//流水记录
|
|
|
$orderData['shopId'] = $shopId;
|
|
|
StockRecordClass::addRecordByOrder($orderData,StockRecordClass::STOCK_RECORD_TYPE_IN_STOCK);
|
|
|
-
|
|
|
$transaction->commit();
|
|
|
|
|
|
}catch (\Exception $exception){
|
|
|
@@ -138,7 +151,7 @@ class StockInOrderClass extends BaseClass
|
|
|
//2021.1.23 linqh 订单详情
|
|
|
public static function getOrderDetail($orderSn,$shopId)
|
|
|
{
|
|
|
- $orderData = self::orderExist(['orderSn'=>$orderSn,'outShopId'=>$shopId]);
|
|
|
+ $orderData = self::orderExist(['orderSn'=>$orderSn,'inShopId'=>$shopId]);
|
|
|
$orderInfo = StockInOrderItemClass::getOrderItemDetail($orderSn);
|
|
|
$itemData = [];
|
|
|
if($orderInfo) {
|