|
|
@@ -29,14 +29,14 @@ class BookCustomClass extends BaseClass
|
|
|
$bigUnit = $product->bigUnit ?? '扎';
|
|
|
$bookSn = $shop->bookSn ?? '';
|
|
|
$mainId = $shop->mainId ?? 0;
|
|
|
- $customId = $order->customId ?? 0;
|
|
|
- $customName = $order->customName ?? '';
|
|
|
- $customNamePy = $order->customNamePy ?? '';
|
|
|
+ $customId = $bookCustomRes->customId ?? 0;
|
|
|
+ $customName = $bookCustomRes->name ?? '';
|
|
|
+ $customNamePy = $bookCustomRes->py ?? '';
|
|
|
$currentCapitalType = dict::getDict('capitalType', 'ghsCheckIn');
|
|
|
$staffName = $params['staffName'] ?? '';
|
|
|
$staffId = $params['staffId'] ?? 0;
|
|
|
- $orderSn = $bill->orderSn??'';
|
|
|
- $event = "采购单 {$orderSn} 入库,{$name} 上架 ".$addOnNum . $bigUnit;
|
|
|
+ $orderSn = $bill->orderSn ?? '';
|
|
|
+ $event = "采购单 {$orderSn} 入库,{$name} 上架 " . $addOnNum . $bigUnit;
|
|
|
$changeData = [
|
|
|
'mainId' => $mainId,
|
|
|
'bookSn' => $bookSn,
|
|
|
@@ -113,7 +113,7 @@ class BookCustomClass extends BaseClass
|
|
|
return $bookCustomRes;
|
|
|
}
|
|
|
|
|
|
- public static function delRoadNum($bookCustomRes, $delRoadNum, $num, $order, $shop, $product, $params)
|
|
|
+ public static function delRoadNum($bookCustomRes, $delRoadNum, $num, $bill, $shop, $product, $params)
|
|
|
{
|
|
|
$bookCustomRes->roadNum = bcsub($bookCustomRes->roadNum, $delRoadNum);
|
|
|
$bookCustomRes->save();
|
|
|
@@ -134,23 +134,23 @@ class BookCustomClass extends BaseClass
|
|
|
$currentCapitalType = dict::getDict('capitalType', 'delBook');
|
|
|
$staffName = $params['staffName'] ?? '';
|
|
|
$staffId = $params['staffId'] ?? 0;
|
|
|
- $currentChangeType = $params['currentChangeType']??'delBook';
|
|
|
- if($currentChangeType == 'putIn') {
|
|
|
+ $currentChangeType = $params['currentChangeType'] ?? 'delBook';
|
|
|
+ if ($currentChangeType == 'putIn') {
|
|
|
//入库
|
|
|
$currentCapitalType = dict::getDict('capitalType', 'ghsCheckIn');
|
|
|
- $customId = 0;
|
|
|
- $customName = '';
|
|
|
- $customNamePy = '';
|
|
|
- $orderSn = $bill->orderSn??'';
|
|
|
- $event = "采购单 {$orderSn} 入库上架,{$name} 路上减少".$delRoadNum . $bigUnit;
|
|
|
- }elseif($currentChangeType == 'delBook'){
|
|
|
+ $customId = $bookCustomRes->customId ?? 0;
|
|
|
+ $customName = $bookCustomRes->name ?? '';
|
|
|
+ $customNamePy = $bookCustomRes->py ?? '';
|
|
|
+ $orderSn = $bill->orderSn ?? '';
|
|
|
+ $event = "采购单 {$orderSn} 入库上架,{$name} 路上减少" . $delRoadNum . $bigUnit;
|
|
|
+ } elseif ($currentChangeType == 'delBook') {
|
|
|
//减少预订
|
|
|
$currentCapitalType = dict::getDict('capitalType', 'delBook');
|
|
|
$customId = $bill->customId ?? 0;
|
|
|
$customName = $bill->customName ?? '';
|
|
|
$customNamePy = $bill->customNamePy ?? '';
|
|
|
$event = $customName . '减少预订' . $name . $num . $bigUnit . ',其中路上减少' . $delRoadNum . $bigUnit;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$event = '';
|
|
|
$customId = 0;
|
|
|
$customName = '';
|