|
|
@@ -233,8 +233,20 @@ class PurchaseOrderController extends BaseController
|
|
|
$content .= '<TEXT x="30" y="250" font="12" w="2" h="2" r="0">' . $unit . '</TEXT>';
|
|
|
}
|
|
|
} else {
|
|
|
- $content .= '<QR x="35" y="100" e="L" w="5">' . Yii::$app->params['mallHost'] . "/item/show-info?id=" . $productId . '</QR>';
|
|
|
- $content .= '<TEXT x="40" y="270" font="12" w="1" h="1" r="0">扫码看价格</TEXT>';
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
+ $printPrice = [4556];
|
|
|
+ } else {
|
|
|
+ $printPrice = [644];
|
|
|
+ }
|
|
|
+ if (in_array($this->mainId, $printPrice)) {
|
|
|
+ //打价格
|
|
|
+ $price = $item->skPrice ?? 0;
|
|
|
+ $price = floatval($price);
|
|
|
+ $content .= '<TEXT x="35" y="150" font="12" w="4" h="4" r="0">' . $price . '元</TEXT>';
|
|
|
+ }else{
|
|
|
+ $content .= '<QR x="35" y="100" e="L" w="5">' . Yii::$app->params['mallHost'] . "/item/show-info?id=" . $productId . '</QR>';
|
|
|
+ $content .= '<TEXT x="40" y="270" font="12" w="1" h="1" r="0">扫码看价格</TEXT>';
|
|
|
+ }
|
|
|
}
|
|
|
$p->printLabelMsg($content);
|
|
|
}
|