|
|
@@ -5,6 +5,7 @@ namespace ghs\controllers;
|
|
|
use biz\ghs\classes\GhsClass;
|
|
|
use biz\sj\classes\SjClass;
|
|
|
use bizGhs\book\classes\BookItemClass;
|
|
|
+use bizGhs\custom\classes\CustomClass;
|
|
|
use bizGhs\order\classes\PurchaseOrderClass;
|
|
|
use bizGhs\order\classes\PurchaseOrderItemClass;
|
|
|
use bizGhs\product\classes\ProductClass;
|
|
|
@@ -203,6 +204,9 @@ class PurchaseOrderController extends BaseController
|
|
|
$ids = array_unique($ids);
|
|
|
$infoList = ProductClass::getAllByCondition(['id' => ['in', $ids]], null, '*', 'id');
|
|
|
|
|
|
+ $priceMap = CustomClass::$levelPriceKeyMap;
|
|
|
+ $addPriceMap = CustomClass::$levelAddPriceKeyMap;
|
|
|
+
|
|
|
foreach ($itemList as $key => $item) {
|
|
|
$name = $item->name ?? '';
|
|
|
$num = !empty($item->itemNum) ? floatval($item->itemNum) : 0;
|
|
|
@@ -220,8 +224,15 @@ class PurchaseOrderController extends BaseController
|
|
|
$unit = '若干' . $smallUnit . '装';
|
|
|
}
|
|
|
|
|
|
- $price = $infoList[$productId] && $infoList[$productId]['skPrice'] ? $infoList[$productId]['skPrice'] : 0;
|
|
|
- $price = floatval($price);
|
|
|
+ $price = 0;
|
|
|
+ $hyPrice = 0;
|
|
|
+ if (isset($infoList[$productId])) {
|
|
|
+ $currentInfo = $infoList[$productId];
|
|
|
+ $price = ProductClass::getFinalPrice($currentInfo, 0, $priceMap, $addPriceMap);
|
|
|
+ $price = floatval($price);
|
|
|
+ $hyPrice = ProductClass::getFinalPrice($currentInfo, 1, $priceMap, $addPriceMap);
|
|
|
+ $hyPrice = floatval($hyPrice);
|
|
|
+ }
|
|
|
|
|
|
if (stringUtil::getWordNum($name) > 8) {
|
|
|
$content = '<TEXT x="30" y="30" font="12" w="1" h="1" r="0">' . $name . '</TEXT>';
|
|
|
@@ -240,9 +251,9 @@ class PurchaseOrderController extends BaseController
|
|
|
} elseif ($mainId == 72057) {
|
|
|
$content .= '<TEXT x="30" y="250" font="12" w="2" h="2" r="0">淘花里小榄店</TEXT>';
|
|
|
} else {
|
|
|
- if($priceOption == 0){
|
|
|
+ if ($priceOption == 0) {
|
|
|
$content .= '<TEXT x="30" y="250" font="12" w="2" h="2" r="0">' . $unit . '</TEXT>';
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$content .= '<TEXT x="30" y="250" font="12" w="2" h="2" r="0">' . $unit . ' ' . $price . '元</TEXT>';
|
|
|
}
|
|
|
}
|
|
|
@@ -254,12 +265,10 @@ class PurchaseOrderController extends BaseController
|
|
|
}
|
|
|
if (in_array($this->mainId, $doublePrice)) {
|
|
|
//惠雅鲜花,打价格,显示正价和会员价,多处同步修改,关键词 hy_print_label_price ssh 20260101
|
|
|
- $hyPrice = $infoList[$productId] && $infoList[$productId]['price'] ? $infoList[$productId]['price'] : 0;
|
|
|
- $hyPrice = floatval($hyPrice);
|
|
|
$content .= '<TEXT x="35" y="90" font="12" w="2" h="2" r="0">----------</TEXT>';
|
|
|
$content .= '<TEXT x="35" y="150" font="12" w="2" h="2" r="0">正价 ' . $price . '元</TEXT>';
|
|
|
$content .= '<TEXT x="35" y="230" font="12" w="2" h="2" r="0">会员价 ' . $hyPrice . '元</TEXT>';
|
|
|
- }elseif ($this->mainId == 4556) {
|
|
|
+ } elseif ($this->mainId == 4556) {
|
|
|
//打价格,显示零售价,并且不带元,杭州斗南鲜花不要带元
|
|
|
$content .= '<TEXT x="35" y="150" font="12" w="4" h="4" r="0">' . $price . '</TEXT>';
|
|
|
} else {
|