|
@@ -17,7 +17,6 @@ class Pages extends BaseController
|
|
|
parent::__construct($f3);
|
|
parent::__construct($f3);
|
|
|
$this->CORE_SETTINGS = $f3->get('CORE.fb');
|
|
$this->CORE_SETTINGS = $f3->get('CORE.fb');
|
|
|
$this->findBoxCore = new \FindBoxCoreSystem(...array_values($this->CORE_SETTINGS));
|
|
$this->findBoxCore = new \FindBoxCoreSystem(...array_values($this->CORE_SETTINGS));
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function Login($f3)
|
|
public function Login($f3)
|
|
@@ -56,14 +55,9 @@ class Pages extends BaseController
|
|
|
$distinta->CleanDistintaTable();
|
|
$distinta->CleanDistintaTable();
|
|
|
$distinta->CopyDistinta($stepValues['consegna']);
|
|
$distinta->CopyDistinta($stepValues['consegna']);
|
|
|
|
|
|
|
|
-// $CORE_SETTINGS = \F3::get('CORE.fb');
|
|
|
|
|
-// $findBoxCore = new \FindBoxCoreSystem(...array_values($CORE_SETTINGS));
|
|
|
|
|
$label = new \SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
$label = new \SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
|
$label->BlinkSpecial(0, 1, 1000, 8, 0);
|
|
$label->BlinkSpecial(0, 1, 1000, 8, 0);
|
|
|
|
|
|
|
|
- // TODO #RIMUOVERE_ASSOLUTAMENTE
|
|
|
|
|
- $distinta->SaveLabelCarrello($stepValues['labelid'], $stepValues['labelid'], $stepValues['consegna']);
|
|
|
|
|
-
|
|
|
|
|
$distinta->SaveProductsToFindBox('3', true, 50); // prende soltanto i primi 3 dalla tabella copia delle distinte
|
|
$distinta->SaveProductsToFindBox('3', true, 50); // prende soltanto i primi 3 dalla tabella copia delle distinte
|
|
|
|
|
|
|
|
$f3->set('COOKIE.p2l', json_encode($stepValues));
|
|
$f3->set('COOKIE.p2l', json_encode($stepValues));
|
|
@@ -100,11 +94,7 @@ class Pages extends BaseController
|
|
|
$codeFromLabelId = $distinta->GetBarcodeFromLabelId($pickedBarcode);
|
|
$codeFromLabelId = $distinta->GetBarcodeFromLabelId($pickedBarcode);
|
|
|
$pickedBarcode = $codeFromLabelId ?? $pickedBarcode;
|
|
$pickedBarcode = $codeFromLabelId ?? $pickedBarcode;
|
|
|
if ($distinta->RemoveQuantity($pickedBarcode)) {
|
|
if ($distinta->RemoveQuantity($pickedBarcode)) {
|
|
|
- // BlinkOFF solo se non è lo stesso barcode precedente
|
|
|
|
|
- // if ($distinta->GetArticleCount($pickedBarcode) == 0) {
|
|
|
|
|
// SPEGNE LED ETICHETTA DOPO PICKING
|
|
// SPEGNE LED ETICHETTA DOPO PICKING
|
|
|
-// $CORE_SETTINGS = \F3::get('CORE.fb');
|
|
|
|
|
-// $findBoxCore = new \FindBoxCoreSystem(...array_values($CORE_SETTINGS));
|
|
|
|
|
$label = new \SmartESL($this->findBoxCore, [$distinta->GetLabelIdFromBarcode($pickedBarcode)]);
|
|
$label = new \SmartESL($this->findBoxCore, [$distinta->GetLabelIdFromBarcode($pickedBarcode)]);
|
|
|
$label->BlinkOff();
|
|
$label->BlinkOff();
|
|
|
} else {
|
|
} else {
|
|
@@ -122,8 +112,6 @@ class Pages extends BaseController
|
|
|
$anomalie = $distinta->getAnomalieFromConsegne($datiCommessa['consegna']);
|
|
$anomalie = $distinta->getAnomalieFromConsegne($datiCommessa['consegna']);
|
|
|
$f3->set('LISTANOMALIE', $anomalie);
|
|
$f3->set('LISTANOMALIE', $anomalie);
|
|
|
|
|
|
|
|
-// $CORE_SETTINGS = $f3->get('CORE.fb');
|
|
|
|
|
-// $findBoxCore = new \FindBoxCoreSystem(...array_values($CORE_SETTINGS));
|
|
|
|
|
$label = new \SmartESL($this->findBoxCore, [$datiCommessa['labelid']]);
|
|
$label = new \SmartESL($this->findBoxCore, [$datiCommessa['labelid']]);
|
|
|
$label->BlinkSpecial(0, 1, 5000, 8, 0);
|
|
$label->BlinkSpecial(0, 1, 5000, 8, 0);
|
|
|
$distinta->SaveLabelCarrello($datiCommessa['labelid'], $datiCommessa['labelid'], $datiCommessa['consegna']);
|
|
$distinta->SaveLabelCarrello($datiCommessa['labelid'], $datiCommessa['labelid'], $datiCommessa['consegna']);
|
|
@@ -135,9 +123,7 @@ class Pages extends BaseController
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
// Seleziona le prossime tre etichette
|
|
// Seleziona le prossime tre etichette
|
|
|
- foreach ($rowsDistinta as $rowDist) {
|
|
|
|
|
-// $CORE_SETTINGS = $f3->get('CORE.fb');
|
|
|
|
|
-// $findBoxCore = new \FindBoxCoreSystem(...array_values($CORE_SETTINGS));
|
|
|
|
|
|
|
+ foreach($rowsDistinta as $rowDist) {
|
|
|
$labelId = $distinta->GetLabelIdFromBarcode($rowDist['barcode']);
|
|
$labelId = $distinta->GetLabelIdFromBarcode($rowDist['barcode']);
|
|
|
if ($labelId != null) {
|
|
if ($labelId != null) {
|
|
|
$label = new \SmartESL($this->findBoxCore, [$labelId]);
|
|
$label = new \SmartESL($this->findBoxCore, [$labelId]);
|
|
@@ -161,7 +147,7 @@ class Pages extends BaseController
|
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public function Bind($f3, $args)
|
|
|
|
|
|
|
+ public function Bind($f3, array $args)
|
|
|
{
|
|
{
|
|
|
$stepValues = [];
|
|
$stepValues = [];
|
|
|
if ($args['step'] == 1)
|
|
if ($args['step'] == 1)
|
|
@@ -175,8 +161,6 @@ class Pages extends BaseController
|
|
|
$f3->set('COOKIE.bind', json_encode($stepValues));
|
|
$f3->set('COOKIE.bind', json_encode($stepValues));
|
|
|
|
|
|
|
|
if ($args['step'] == 3) {
|
|
if ($args['step'] == 3) {
|
|
|
-// $CORE_SETTINGS = $f3->get('CORE.fb');
|
|
|
|
|
-// $findBoxCore = new \FindBoxCoreSystem(...array_values($CORE_SETTINGS));
|
|
|
|
|
$this->findBoxCore->Bind($stepValues['labelid'], $stepValues['barcode']);
|
|
$this->findBoxCore->Bind($stepValues['labelid'], $stepValues['barcode']);
|
|
|
$label = new \SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
$label = new \SmartESL($this->findBoxCore, [$stepValues['labelid']]);
|
|
|
|
|
|
|
@@ -218,11 +202,24 @@ class Pages extends BaseController
|
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public function UnBind($f3, array $args)
|
|
|
|
|
+ {
|
|
|
|
|
+ $stepValues = array_map('strtoupper', $f3->get('POST'));
|
|
|
|
|
+ if ($args['step'] == 2) {
|
|
|
|
|
+ $success = $this->findBoxCore->UnBind($stepValues['labelid']);
|
|
|
|
|
+ if ($success['err'] <> 0) {
|
|
|
|
|
+ $f3->set('INFOTEXT', $success['value']);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $f3->set('STEP', $args['step']);
|
|
|
|
|
+ $f3->set('CONTENT', 'unbind.tpl');
|
|
|
|
|
+ echo \Template::instance()->render('masterpage.tpl');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function ElencoDistinta($f3)
|
|
public function ElencoDistinta($f3)
|
|
|
{
|
|
{
|
|
|
$distinta = new \Distinta($f3);
|
|
$distinta = new \Distinta($f3);
|
|
|
$f3->set('PRODUCTS', $distinta->getDistinte());
|
|
$f3->set('PRODUCTS', $distinta->getDistinte());
|
|
|
-
|
|
|
|
|
$f3->set('CONTENT', 'distinta.tpl');
|
|
$f3->set('CONTENT', 'distinta.tpl');
|
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
echo \Template::instance()->render('masterpage.tpl');
|
|
|
}
|
|
}
|