|
@@ -910,10 +910,20 @@ class OrderClass extends BaseClass
|
|
|
{
|
|
{
|
|
|
//58mm的机器,一行打印16个汉字,32个字母
|
|
//58mm的机器,一行打印16个汉字,32个字母
|
|
|
$name = $current['name'] ?? '';
|
|
$name = $current['name'] ?? '';
|
|
|
- $content .= "<B>".$name . '</B><BR>';
|
|
|
|
|
|
|
+
|
|
|
$productNum = $current['num'] ?? '';
|
|
$productNum = $current['num'] ?? '';
|
|
|
|
|
+ $content .= '<B>' . $name . ' ' . $productNum . '</B><BR>';
|
|
|
|
|
+ $blankNum = bcsub(12, strlen($productNum));
|
|
|
|
|
+ if ($blankNum > 0) {
|
|
|
|
|
+ $productNum = $productNum . str_repeat(' ', $blankNum);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$productPrice = $current['price'] ?? '';
|
|
$productPrice = $current['price'] ?? '';
|
|
|
- $content .= "<B>" . $productNum . ' ' . $productPrice . '</B><BR>';
|
|
|
|
|
|
|
+ $blankNum = bcsub(7, strlen($productPrice));
|
|
|
|
|
+ if ($blankNum > 0) {
|
|
|
|
|
+ $productPrice = $productPrice . str_repeat(' ', $blankNum);
|
|
|
|
|
+ }
|
|
|
|
|
+ $content .= $productNum . ' ' . $productPrice . '<BR>';
|
|
|
return $content;
|
|
return $content;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -973,7 +983,9 @@ class OrderClass extends BaseClass
|
|
|
|
|
|
|
|
if (isset($respond['product']) && !empty($respond['product'])) {
|
|
if (isset($respond['product']) && !empty($respond['product'])) {
|
|
|
foreach ($respond['product'] as $current) {
|
|
foreach ($respond['product'] as $current) {
|
|
|
|
|
+
|
|
|
$content = self::printGroup($current, $content);
|
|
$content = self::printGroup($current, $content);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
$content .= '--------------------------------<BR>';
|
|
$content .= '--------------------------------<BR>';
|
|
|
}
|
|
}
|
|
@@ -983,17 +995,28 @@ class OrderClass extends BaseClass
|
|
|
foreach ($respond['refund'] as $current) {
|
|
foreach ($respond['refund'] as $current) {
|
|
|
//58mm的机器,一行打印16个汉字,32个字母
|
|
//58mm的机器,一行打印16个汉字,32个字母
|
|
|
$name = $current['name'] ?? '';
|
|
$name = $current['name'] ?? '';
|
|
|
- $content .= "<B>".$name . '</B><BR>';
|
|
|
|
|
|
|
+ $content .= $name . '<BR>';
|
|
|
|
|
+ $name = str_repeat(' ', 10);
|
|
|
|
|
+
|
|
|
$productNum = $current['num'] ?? '';
|
|
$productNum = $current['num'] ?? '';
|
|
|
|
|
+ $blankNum = bcsub(12, strlen($productNum));
|
|
|
|
|
+ if ($blankNum > 0) {
|
|
|
|
|
+ $productNum = $productNum . str_repeat(' ', $blankNum);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$productPrice = $current['price'] ?? '';
|
|
$productPrice = $current['price'] ?? '';
|
|
|
- $content .= "<B>" . $productNum . ' ' . $productPrice . '</B><BR>';
|
|
|
|
|
|
|
+ $blankNum = bcsub(7, strlen($productPrice));
|
|
|
|
|
+ if ($blankNum > 0) {
|
|
|
|
|
+ $productPrice = $productPrice . str_repeat(' ', $blankNum);
|
|
|
|
|
+ }
|
|
|
|
|
+ $content .= $name . " " . $productNum . ' ' . $productPrice . '<BR>';
|
|
|
}
|
|
}
|
|
|
$content .= '--------------------------------<BR>';
|
|
$content .= '--------------------------------<BR>';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (isset($orderInfo['itemPrice']) && $orderInfo['itemPrice'] > 0) {
|
|
|
|
|
- $content .= '商品金额:' . floatval($orderInfo['itemPrice']) . '<BR>';
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (isset($orderInfo['itemPrice']) && $orderInfo['itemPrice'] > 0) {
|
|
|
|
|
+ $content .= '商品金额:' . floatval($orderInfo['itemPrice']) . '<BR>';
|
|
|
|
|
+ }
|
|
|
if (isset($respond['sendCost']) && $respond['sendCost'] > 0) {
|
|
if (isset($respond['sendCost']) && $respond['sendCost'] > 0) {
|
|
|
$content .= ' 运费:' . floatval($respond['sendCost']) . '<BR>';
|
|
$content .= ' 运费:' . floatval($respond['sendCost']) . '<BR>';
|
|
|
}
|
|
}
|
|
@@ -1106,7 +1129,7 @@ class OrderClass extends BaseClass
|
|
|
$bigTotalPrice = bcmul($bigUnitPrice, $bigNum, 2);
|
|
$bigTotalPrice = bcmul($bigUnitPrice, $bigNum, 2);
|
|
|
$printProduct[] = [
|
|
$printProduct[] = [
|
|
|
'name' => $itemVal['name'] ?? '',
|
|
'name' => $itemVal['name'] ?? '',
|
|
|
- 'num' => floatval($bigNum) . '扎 *' . floatval($bigUnitPrice),
|
|
|
|
|
|
|
+ 'num' => floatval($bigNum) . '扎*' . floatval($bigUnitPrice),
|
|
|
'price' => floatval($bigTotalPrice),
|
|
'price' => floatval($bigTotalPrice),
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
@@ -1114,7 +1137,7 @@ class OrderClass extends BaseClass
|
|
|
$smallTotalPrice = bcmul($smallUnitPrice, $smallNum, 2);
|
|
$smallTotalPrice = bcmul($smallUnitPrice, $smallNum, 2);
|
|
|
$printProduct[] = [
|
|
$printProduct[] = [
|
|
|
'name' => $itemVal['name'] ?? '',
|
|
'name' => $itemVal['name'] ?? '',
|
|
|
- 'num' => floatval($smallNum) . '支 *' . floatval($smallUnitPrice),
|
|
|
|
|
|
|
+ 'num' => floatval($smallNum) . '支*' . floatval($smallUnitPrice),
|
|
|
'price' => floatval($smallTotalPrice),
|
|
'price' => floatval($smallTotalPrice),
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|