|
|
@@ -122,6 +122,10 @@ class ShopExtController extends BaseController
|
|
|
$printKey = $get['printKey'] ?? '';
|
|
|
$printLabelSn = $get['printLabelSn'] ?? '';
|
|
|
$printLabelKey = $get['printLabelKey'] ?? '';
|
|
|
+
|
|
|
+ $wlLabelSn = $get['wlLabelSn'] ?? '';
|
|
|
+ $wlLabelKey = $get['wlLabelKey'] ?? '';
|
|
|
+
|
|
|
$shop = $this->shop;
|
|
|
$default = $shop->default ?? 0;
|
|
|
$shopName = $shop->shopName ?? '';
|
|
|
@@ -162,6 +166,27 @@ class ShopExtController extends BaseController
|
|
|
$ext->printLabelKey = '';
|
|
|
$ext->save();
|
|
|
}
|
|
|
+
|
|
|
+ if (!empty($wlLabelSn) && !empty($wlLabelKey)) {
|
|
|
+ $labelPrint = new printUtil($wlLabelSn);
|
|
|
+ $return = $labelPrint->addPrint($wlLabelKey, $name);
|
|
|
+ if ($return) {
|
|
|
+ $ext->wlLabelSn = $wlLabelSn;
|
|
|
+ $ext->wlLabelKey = $wlLabelKey;
|
|
|
+ $ext->save();
|
|
|
+ //将打印纸张设置为60X100
|
|
|
+ $labelPrint->times = 1;
|
|
|
+ $content = '<SIZE>60,100</SIZE>';
|
|
|
+ $labelPrint->printLabelMsg($content);
|
|
|
+ } else {
|
|
|
+ $hasFail = 1;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ $ext->wlLabelSn = '';
|
|
|
+ $ext->wlLabelKey = '';
|
|
|
+ $ext->save();
|
|
|
+ }
|
|
|
+
|
|
|
if ($hasFail == 1) {
|
|
|
util::success(['hasFail' => 1], '出现添加失败的情况');
|
|
|
}
|