|
|
@@ -1945,7 +1945,7 @@ class OrderClass extends BaseClass
|
|
|
/**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
|
|
|
$orderMainId = $orderInfo['mainId'] ?? 0;
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $map = [65726, 58, 25119, 28500, 1294,12925];
|
|
|
+ $map = [65726, 58, 25119, 28500, 1294, 12925];
|
|
|
} else {
|
|
|
$map = [828];
|
|
|
}
|
|
|
@@ -3003,7 +3003,7 @@ XL;
|
|
|
/**************************如果是好多花的云仓还要再打一下标签纸,多处要同步修改,关键词 hdh_yc *****************************/
|
|
|
$orderMainId = $order->mainId;
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
- $map = [65726, 58, 25119, 28500, 1294,12925];
|
|
|
+ $map = [65726, 58, 25119, 28500, 1294, 12925];
|
|
|
} else {
|
|
|
$map = [828];
|
|
|
}
|
|
|
@@ -3106,6 +3106,71 @@ XL;
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ //打印花材的物流标 ssh 20260507
|
|
|
+ public static function printItemLabel($order, $shop, $ext, $product, $num, $boxNum, $orderItem)
|
|
|
+ {
|
|
|
+ $customId = $order->customId ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+
|
|
|
+ $customMobile = $order->customMobile ?? '';
|
|
|
+
|
|
|
+ $customName = $order->customName ?? '';
|
|
|
+ $remark = $order->remark ?? '';
|
|
|
+ $shortRemark = stringUtil::subStringUtf8($remark, 8);
|
|
|
+ $wlName = $custom->wlName ?? '';
|
|
|
+ if (empty($wlName)) {
|
|
|
+ $wlName = $shortRemark;
|
|
|
+ }
|
|
|
+ $distId = $custom->distId ?? '';
|
|
|
+ $dist = DistClass::getById($distId, true);
|
|
|
+ $distName = $dist->name ?? '未分区';
|
|
|
+
|
|
|
+ $address = $order->address ?? '';
|
|
|
+ $floor = $order->floor ?? '';
|
|
|
+ $fullAddress = $address . $floor;
|
|
|
+
|
|
|
+ $wlLabelSn = $ext->wlLabelSn ?? '';
|
|
|
+ if (empty($wlLabelSn)) {
|
|
|
+ util::fail('请绑定物流标签机');
|
|
|
+ }
|
|
|
+ $p = new printUtil($wlLabelSn);
|
|
|
+ $p->times = $num;
|
|
|
+ $sameTimeIds = $order->sameTimeIds;
|
|
|
+ $num = 1;
|
|
|
+ if (!empty($sameTimeIds)) {
|
|
|
+ $ids = explode(',', $sameTimeIds);
|
|
|
+ if (!empty($ids)) {
|
|
|
+ $num = count($ids);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($num > 1) {
|
|
|
+ $customName = $customName . ' ' . $num . '单';
|
|
|
+ }
|
|
|
+ $remark = '';
|
|
|
+ if (!empty($orderItem->remark)) {
|
|
|
+ $remark .= $orderItem->remark;
|
|
|
+ }
|
|
|
+ if (!empty($order->remark)) {
|
|
|
+ if(!empty($remark)){
|
|
|
+ $remark .= ' '.$order->remark;
|
|
|
+ }else{
|
|
|
+ $remark .= $order->remark;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ $productName = $product->name ?? '';
|
|
|
+ $content = '<TEXT x="400" y="30" font="12" w="2" h="2" r="90">客户:' . $customName . '</TEXT>';
|
|
|
+ $content .= '<TEXT x="325" y="30" font="12" w="2" h="2" r="90">地址:' . $fullAddress . '</TEXT>';
|
|
|
+ $content .= '<TEXT x="250" y="30" font="12" w="2" h="2" r="90">电话:' . $customMobile . '</TEXT>';
|
|
|
+ $content .= '<TEXT x="180" y="30" font="12" w="2" h="2" r="90">备注:' . $remark . '</TEXT>';
|
|
|
+ $content .= '<TEXT x="120" y="30" font="12" w="2" h="2" r="90">————————————————————</TEXT>';
|
|
|
+ $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">' . $productName . ' 装箱数:' . $boxNum . '</TEXT>';
|
|
|
+ $p->printLabelMsg($content);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 更新同天内的所有订单的 sameTimeIds
|
|
|
public static function updateSameTimeIds($order, $date)
|
|
|
{
|
|
|
@@ -3134,12 +3199,12 @@ XL;
|
|
|
// 排序并去重
|
|
|
sort($ids);
|
|
|
$ids = array_unique($ids);
|
|
|
-
|
|
|
+
|
|
|
// 限制最多 90 单,避免 someTimeIds 过长(兼容原先业务逻辑限制)
|
|
|
if (count($ids) > 90) {
|
|
|
$ids = array_slice($ids, 0, 90);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
$sameTimeIdsStr = implode(',', $ids);
|
|
|
// 更新所有相关订单
|
|
|
if (!empty($ids) && in_array($id, $ids)) {
|