Browse Source

打印

master
Lemon 5 years ago
parent
commit
8de2eaeecb
  1. 6
      app/Service/v3/Implementations/FeiePrintService.php

6
app/Service/v3/Implementations/FeiePrintService.php

@ -124,7 +124,7 @@ class FeiePrintService implements FeiePrintServiceInterface
$goodsTotal = bcmul($goods->number,$goods->price,2); $goodsTotal = bcmul($goods->number,$goods->price,2);
$priceLen = mb_strwidth($goods->price); $priceLen = mb_strwidth($goods->price);
$totalLen = mb_strwidth($goodsTotal); $totalLen = mb_strwidth($goodsTotal);
if($nameLength > ($B+$C+$D-$priceLen-$totalLen)){
if($nameLength >= ($B+$C+$D-$priceLen-$totalLen)){
$orderInfo .= '<BR>'; $orderInfo .= '<BR>';
$orderInfo .= str_pad($goods->price,$A+$B+$C,' ',STR_PAD_LEFT); $orderInfo .= str_pad($goods->price,$A+$B+$C,' ',STR_PAD_LEFT);
}else{ }else{
@ -170,11 +170,13 @@ class FeiePrintService implements FeiePrintServiceInterface
$orderInfo .= str_pad($total,$C+$D+$totalLength+1,' ',STR_PAD_LEFT); $orderInfo .= str_pad($total,$C+$D+$totalLength+1,' ',STR_PAD_LEFT);
$orderInfo .= '<BR>'; $orderInfo .= '<BR>';
$orderInfo .= '配送方式:' . $arr->shipping_type_text . '<BR>'; $orderInfo .= '配送方式:' . $arr->shipping_type_text . '<BR>';
if($arr->shipping_type != Shipping::SELF_TAKING){
if($arr->shipping_type != Shipping::TYPE_SELF_TAKE){
$orderInfo .= '送货地点:' . $arr->address . '<BR>'; $orderInfo .= '送货地点:' . $arr->address . '<BR>';
} }
if(!empty($arr->tel)){
$tel = substr_replace( $arr->tel, '****', 3, 4); $tel = substr_replace( $arr->tel, '****', 3, 4);
$orderInfo .= '联系电话:' . $tel . '<BR>'; $orderInfo .= '联系电话:' . $tel . '<BR>';
}
$orderInfo .= '下单时间:' . $arr->pay_time_text . '<BR>'; $orderInfo .= '下单时间:' . $arr->pay_time_text . '<BR>';
$orderInfo .= '送达时间:' . $arr->delivery_time_note . '<BR>'; $orderInfo .= '送达时间:' . $arr->delivery_time_note . '<BR>';
//$orderInfo .= '<QR>http://www.feieyun.com</QR>';//把解析后的二维码生成的字符串用标签套上即可自动生成二维码 //$orderInfo .= '<QR>http://www.feieyun.com</QR>';//把解析后的二维码生成的字符串用标签套上即可自动生成二维码

Loading…
Cancel
Save