|
|
@@ -26,7 +26,7 @@ class WorkClass extends BaseClass
|
|
|
const STATUS_CANCEL = 2;
|
|
|
|
|
|
//打印工单 ssh 20220601
|
|
|
- public static function print($work, $shop,$mustPrint=true)
|
|
|
+ public static function print($work, $shop, $mustPrint = true)
|
|
|
{
|
|
|
$orderSn = $work->orderSn ?? '';
|
|
|
if (!empty($orderSn)) {
|
|
|
@@ -40,7 +40,7 @@ class WorkClass extends BaseClass
|
|
|
$ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
|
|
|
$printLabelSn = $ext->printLabelSn ?? '';
|
|
|
if (empty($printLabelSn)) {
|
|
|
- if($mustPrint){
|
|
|
+ if ($mustPrint) {
|
|
|
util::fail('请设置标签打印机');
|
|
|
}
|
|
|
} else {
|
|
|
@@ -50,6 +50,9 @@ class WorkClass extends BaseClass
|
|
|
if (!empty($workItemList)) {
|
|
|
foreach ($workItemList as $item) {
|
|
|
$goodsSn = $item->goodsSn ?? '';
|
|
|
+ if (empty($goodsSn)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
$num = $item->num ?? 1;
|
|
|
$name = $item->name ?? '';
|
|
|
$content = '<TEXT x="360" y="30" font="12" w="2" h="2" r="90">' . $name . '</TEXT>';
|