|
|
@@ -118,8 +118,6 @@ class OrderClass extends BaseClass
|
|
|
self::REFUND_YES => '有退款',
|
|
|
];
|
|
|
|
|
|
- const MAX_NUM = 30;
|
|
|
-
|
|
|
public static function arrival($order, $data)
|
|
|
{
|
|
|
if ($order->stockChange == 1) {
|
|
|
@@ -932,25 +930,8 @@ class OrderClass extends BaseClass
|
|
|
return $content;
|
|
|
}
|
|
|
|
|
|
- //每单超过一定花材数量需要分开打印 ssh 20230210
|
|
|
+ //云打印 ssh 20210709
|
|
|
public static function onlinePrint($orderInfo, $showPrice = 1)
|
|
|
- {
|
|
|
- $showItem = OrderClass::getShowItem(true, $orderInfo);
|
|
|
- $list = $showItem['list'] ?? [];
|
|
|
- $count = count($list);
|
|
|
- if ($count <= self::MAX_NUM) {
|
|
|
- self::doPrint($orderInfo, $showPrice, 0);
|
|
|
- } else {
|
|
|
- $div = bcdiv($count, self::MAX_NUM, 1);
|
|
|
- $div = ceil($div);
|
|
|
- for ($i = 1; $i <= $div; $i++) {
|
|
|
- self::doPrint($orderInfo, $showPrice, $i);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //云打印,$rank 0表示全部打印,n表示分开打第n张 ssh 20210709
|
|
|
- public static function doPrint($orderInfo, $showPrice = 1, $rank = 0)
|
|
|
{
|
|
|
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
@@ -967,15 +948,8 @@ class OrderClass extends BaseClass
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
+
|
|
|
$showItem = OrderClass::getShowItem(true, $orderInfo);
|
|
|
- $itemList = $showItem['list'] ?? [];
|
|
|
- if ($rank > 0) {
|
|
|
- //分开打印
|
|
|
- $offset = ($rank - 1) * self::MAX_NUM;
|
|
|
- $newItemList = $itemList;
|
|
|
- $itemList = array_splice($newItemList, $offset, self::MAX_NUM);
|
|
|
- $showItem['list'] = $itemList;
|
|
|
- }
|
|
|
|
|
|
$customId = $orderInfo['customId'] ?? 0;
|
|
|
$c = CustomClass::getById($customId);
|
|
|
@@ -1024,10 +998,6 @@ class OrderClass extends BaseClass
|
|
|
$content .= '<B>' . $respond['remark'] . '</B><BR>';
|
|
|
}
|
|
|
|
|
|
- if ($rank > 0) {
|
|
|
- $content .= "<BR><CB>【第{$rank}单】</CB><BR>";
|
|
|
- }
|
|
|
-
|
|
|
$content .= '<BR>';
|
|
|
$content .= '花材 数量/单价 金额 <BR>';
|
|
|
$content .= '--------------------------------<BR>';
|