shish 4 lat temu
rodzic
commit
b72a5e52cf
1 zmienionych plików z 9 dodań i 1 usunięć
  1. 9 1
      biz-hd/work/classes/WorkClass.php

+ 9 - 1
biz-hd/work/classes/WorkClass.php

@@ -62,11 +62,19 @@ class WorkClass extends BaseClass
                     if (empty($goodsSn)) {
                         continue;
                     }
+                    $flag = [];
+                    if (isset($item->staffName) && !empty($item->staffName)) {
+                        $flag[] = $item->staffName;
+                    }
+                    if (isset($item->customName) && !empty($item->customName)) {
+                        $flag[] = $item->customName;
+                    }
+                    $flagString = implode("  ", $flag);
                     $num = $item->num ?? 1;
                     $name = $item->name ?? '';
                     $content = '<TEXT x="360" y="30" font="12" w="2" h="2" r="90">' . $name . '</TEXT>';
                     $content .= '<BC128 x="260" y="30" h="80" s="1" r="90" n="5" w="12">' . $goodsSn . '</BC128>';
-                    $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">客服9 - 石头</TEXT>';
+                    $content .= '<TEXT x="60" y="30" font="12" w="2" h="2" r="90">' . $flagString . '</TEXT>';
                     $p->times = $num;
                     $p->printLabelMsg($content);
                 }