|
|
@@ -3,6 +3,7 @@
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
use biz\item\classes\PtItemClass;
|
|
|
+use biz\shop\classes\ShopExtClass;
|
|
|
use bizGhs\book\classes\BookItemClass;
|
|
|
use bizGhs\custom\classes\CustomClass;
|
|
|
use bizGhs\item\classes\ItemClass;
|
|
|
@@ -20,6 +21,28 @@ use Yii;
|
|
|
class ItemController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //设为处理区用的花材 ssh 20250418
|
|
|
+ public function actionSetLosing()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->request->get();
|
|
|
+ $id = $get['id'] ?? '';
|
|
|
+ $item = ItemClass::getById($id, true);
|
|
|
+ if (empty($item)) {
|
|
|
+ util::fail('没有找到花材');
|
|
|
+ }
|
|
|
+ if ($item->mainId != $this->mainId) {
|
|
|
+ util::fail('不是你的花材');
|
|
|
+ }
|
|
|
+ $shopId = $this->shopId;
|
|
|
+ $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
|
|
|
+ if (empty($ext)) {
|
|
|
+ util::fail('设置失败,没有找到门店信息');
|
|
|
+ }
|
|
|
+ $ext->losingItem = $id;
|
|
|
+ $ext->save();
|
|
|
+ util::complete('设置成功');
|
|
|
+ }
|
|
|
+
|
|
|
//增加和减少半扎 ssh 20250417
|
|
|
public function actionChangeHalf()
|
|
|
{
|