|
|
@@ -790,7 +790,7 @@ class OrderClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
//云打印 ssh 20210709
|
|
|
- public static function onlinePrint($order, $must = false, $port = 'front')
|
|
|
+ public static function onlinePrint($order, $must = false, $port = 'front', $params = [])
|
|
|
{
|
|
|
if (empty($order)) {
|
|
|
return false;
|
|
|
@@ -867,7 +867,7 @@ class OrderClass extends BaseClass
|
|
|
|
|
|
$readPeriod = $order->reachPeriod ?? 0;
|
|
|
if ($order->sendType == 1) {
|
|
|
- if (isset($order->reachDate) && !empty($order->reachDate) && $order->reachDate != '0000-00-00') {
|
|
|
+ if (!empty($order->reachDate) && $order->reachDate != '0000-00-00') {
|
|
|
$currentReachDate = date("m-d", strtotime($order->reachDate));
|
|
|
$content .= '<B>' . $currentReachDate . ' ' . $readPeriod . '前</B><BR>';
|
|
|
$content .= '<B>到店自取</B><BR><BR>';
|
|
|
@@ -886,40 +886,39 @@ class OrderClass extends BaseClass
|
|
|
} else {
|
|
|
$content .= '';
|
|
|
}
|
|
|
- if (isset($order->reachDate) && !empty($order->reachDate) && $order->reachDate != '0000-00-00') {
|
|
|
+ if (!empty($order->reachDate) && $order->reachDate != '0000-00-00') {
|
|
|
$currentReachDate = date("m-d", strtotime($order->reachDate));
|
|
|
$content .= '<B>' . $currentReachDate . ' ' . $readPeriod . '前</B><BR><BR>';
|
|
|
}
|
|
|
}
|
|
|
- if (isset($order->receiveUserName) && !empty($order->receiveUserName)) {
|
|
|
+ $fastOrder = $params['fastOrder'] ?? 0;
|
|
|
+ if (!empty($order->receiveUserName) && $fastOrder == 0) {
|
|
|
$content .= '收花人:<BR>';
|
|
|
$content .= '<B>' . $order->receiveUserName . '</B><BR>';
|
|
|
}
|
|
|
- if (isset($order->receiveMobile) && !empty($order->receiveMobile)) {
|
|
|
+ if (!empty($order->receiveMobile)) {
|
|
|
$content .= '<B>' . $order->receiveMobile . '</B><BR><BR>';
|
|
|
}
|
|
|
- if (isset($order->fullAddress) && !empty($order->fullAddress)) {
|
|
|
+ if (!empty($order->fullAddress)) {
|
|
|
$content .= '<B>' . $order->fullAddress . '(' . $order->showAddress . ')' . '</B><BR><BR>';
|
|
|
}
|
|
|
- if (isset($order->cardInfo) && !empty($order->cardInfo)) {
|
|
|
+ if (!empty($order->cardInfo)) {
|
|
|
$content .= '<B>贺卡内容:' . $order->cardInfo . '</B><BR><BR>';
|
|
|
}
|
|
|
if ($order->anonymity == 1) {
|
|
|
$content .= '<B>匿名派送!!</B><BR><BR>';
|
|
|
} else {
|
|
|
- if (isset($order->bookMobile) && !empty($order->bookMobile)) {
|
|
|
+ if (!empty($order->bookMobile) && $fastOrder == 0) {
|
|
|
$bookName = $order->bookName ?? '';
|
|
|
- $bookMobile = $order->bookMobile ?? '';
|
|
|
+ $bookMobile = $order->bookMobile;
|
|
|
$content .= '订花人:<BR>';
|
|
|
if (!empty($bookName)) {
|
|
|
$content .= '<B>' . $bookName . '</B><BR>';
|
|
|
}
|
|
|
- if (!empty($bookMobile)) {
|
|
|
- $content .= '<B>' . $bookMobile . '</B><BR>';
|
|
|
- }
|
|
|
+ $content .= '<B>' . $bookMobile . '</B><BR>';
|
|
|
}
|
|
|
}
|
|
|
- if (isset($respond['remark']) && !empty($respond['remark'])) {
|
|
|
+ if (!empty($respond['remark'])) {
|
|
|
$content .= '<BR>';
|
|
|
$content .= '备注:<BR>';
|
|
|
$content .= '<B>' . $respond['remark'] . '</B><BR>';
|
|
|
@@ -929,14 +928,14 @@ class OrderClass extends BaseClass
|
|
|
$content .= '商品 数量/单价 金额 <BR>';
|
|
|
$content .= '--------------------------------<BR>';
|
|
|
|
|
|
- if (isset($respond['product']) && !empty($respond['product'])) {
|
|
|
+ if (!empty($respond['product'])) {
|
|
|
foreach ($respond['product'] as $current) {
|
|
|
$content = self::printGroup($current, $content);
|
|
|
}
|
|
|
$content .= '--------------------------------<BR>';
|
|
|
}
|
|
|
|
|
|
- if (isset($respond['refund']) && !empty($respond['refund'])) {
|
|
|
+ if (!empty($respond['refund'])) {
|
|
|
$content .= '<B>已退款:</B><BR>';
|
|
|
foreach ($respond['refund'] as $current) {
|
|
|
//58mm的机器,一行打印16个汉字,32个字母
|
|
|
@@ -974,7 +973,7 @@ class OrderClass extends BaseClass
|
|
|
if (isset($order->prePrice) && $order->prePrice > 0) {
|
|
|
$content .= '总计:' . floatval($order->prePrice) . '<BR>';
|
|
|
}
|
|
|
- if (isset($respond['discountAmount']) && !empty($respond['discountAmount']) && $respond['discountAmount'] > 0) {
|
|
|
+ if (!empty($respond['discountAmount']) && $respond['discountAmount'] > 0) {
|
|
|
$content .= '优惠扣除:-' . floatval($respond['discountAmount']) . '<BR>';
|
|
|
}
|
|
|
$content .= '订单金额:' . floatval($respond['orderPrice']) . '<BR>';
|