|
|
@@ -809,6 +809,13 @@ class OrderClass extends BaseClass
|
|
|
}
|
|
|
|
|
|
$shopId = $order->shopId ?? 0;
|
|
|
+ $shop = ShopClass::getById($shopId, true);
|
|
|
+ $sjId = $shop->sjId ?? 0;
|
|
|
+ $sj = SjClass::getById($sjId, true);
|
|
|
+ $sjName = $sj->name ?? '';
|
|
|
+ $shopName = $shop->shopName ?? '';
|
|
|
+ $currentName = $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
|
|
|
+
|
|
|
$ext = ShopExtClass::getByCondition(['shopId' => $shopId]);
|
|
|
$printSn = $ext['printSn'] ?? '';
|
|
|
if ($port == 'make') {
|
|
|
@@ -867,7 +874,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 +893,43 @@ 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)) {
|
|
|
- $content .= '收花人:<BR>';
|
|
|
- $content .= '<B>' . $order->receiveUserName . '</B><BR>';
|
|
|
- }
|
|
|
- if (isset($order->receiveMobile) && !empty($order->receiveMobile)) {
|
|
|
- $content .= '<B>' . $order->receiveMobile . '</B><BR><BR>';
|
|
|
- }
|
|
|
- if (isset($order->fullAddress) && !empty($order->fullAddress)) {
|
|
|
- $content .= '<B>' . $order->fullAddress . '(' . $order->showAddress . ')' . '</B><BR><BR>';
|
|
|
- }
|
|
|
- if (isset($order->cardInfo) && !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)) {
|
|
|
- $bookName = $order->bookName ?? '';
|
|
|
- $bookMobile = $order->bookMobile ?? '';
|
|
|
- $content .= '订花人:<BR>';
|
|
|
- if (!empty($bookName)) {
|
|
|
- $content .= '<B>' . $bookName . '</B><BR>';
|
|
|
- }
|
|
|
- if (!empty($bookMobile)) {
|
|
|
+ $defaultCustomId = $shop->defaultCustomId ?? 0;
|
|
|
+ $fastOrder = $defaultCustomId == $customId ? 1 : 0;
|
|
|
+ //快捷开单不需要显示这些东西
|
|
|
+ if ($fastOrder == 0) {
|
|
|
+ if (!empty($order->receiveUserName)) {
|
|
|
+ $content .= '收花人:<BR>';
|
|
|
+ $content .= '<B>' . $order->receiveUserName . '</B><BR>';
|
|
|
+ }
|
|
|
+ if (!empty($order->receiveMobile)) {
|
|
|
+ $content .= '<B>' . $order->receiveMobile . '</B><BR><BR>';
|
|
|
+ }
|
|
|
+ if (!empty($order->fullAddress)) {
|
|
|
+ $content .= '<B>' . $order->fullAddress . '(' . $order->showAddress . ')' . '</B><BR><BR>';
|
|
|
+ }
|
|
|
+ if (!empty($order->cardInfo)) {
|
|
|
+ $content .= '<B>贺卡内容:' . $order->cardInfo . '</B><BR><BR>';
|
|
|
+ }
|
|
|
+ if ($order->anonymity == 1) {
|
|
|
+ $content .= '<B>匿名派送!!</B><BR><BR>';
|
|
|
+ } else {
|
|
|
+ if (!empty($order->bookMobile)) {
|
|
|
+ $bookName = $order->bookName ?? '';
|
|
|
+ $bookMobile = $order->bookMobile;
|
|
|
+ $content .= '订花人:<BR>';
|
|
|
+ if (!empty($bookName)) {
|
|
|
+ $content .= '<B>' . $bookName . '</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 +939,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 +984,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>';
|
|
|
@@ -990,13 +1000,6 @@ class OrderClass extends BaseClass
|
|
|
$content .= '<B>待付尾款:' . floatval($order->remainDebtPrice) . '</B><BR>';
|
|
|
}
|
|
|
|
|
|
- $shop = ShopClass::getById($shopId, true);
|
|
|
- $sjId = $shop->sjId ?? 0;
|
|
|
- $sj = SjClass::getById($sjId, true);
|
|
|
- $sjName = $sj->name ?? '';
|
|
|
- $shopName = $shop->shopName ?? '';
|
|
|
- $currentName = $shopName == '首店' ? $sjName : $sjName . ' ' . $shopName;
|
|
|
-
|
|
|
$content .= '--------------------------------<BR>';
|
|
|
$content .= '订单日期:' . $order->addTime . '<BR>';
|
|
|
$content .= '订单编号:' . $respond['orderSn'] . '<BR>';
|