|
|
@@ -17,8 +17,8 @@ class StockOutController extends BaseController
|
|
|
//入库单一键出库 ssh 20231207
|
|
|
public function actionOneKeyStockOut()
|
|
|
{
|
|
|
- $get = Yii::$app->request->get();
|
|
|
- $orderSn = $get['orderSn'] ?? '';
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $orderSn = $post['orderSn'] ?? '';
|
|
|
$in = StockInOrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
if (empty($in)) {
|
|
|
util::fail('没有找到入库单');
|
|
|
@@ -27,12 +27,12 @@ class StockOutController extends BaseController
|
|
|
util::fail('不是你的入库单');
|
|
|
}
|
|
|
|
|
|
- $inShopId = $get['inShopId'] ?? 0;
|
|
|
+ $inShopId = $post['inShopId'] ?? 0;
|
|
|
if ($inShopId == $this->shopId) {
|
|
|
util::fail('出库和入库门店一样');
|
|
|
}
|
|
|
- if(empty($inShopId)){
|
|
|
- //如果没有传门店,表示要调回原店,注意!!!!!!!!!!!!!!!!!
|
|
|
+ if (empty($inShopId)) {
|
|
|
+ //如果没有传门店,表示要回调原店,注意!!!!!!!!!!!!!!!!!
|
|
|
$inShopId = $in->outShopId;
|
|
|
}
|
|
|
$inShop = ShopClass::getById($inShopId, true);
|
|
|
@@ -40,6 +40,11 @@ class StockOutController extends BaseController
|
|
|
util::fail('没有找到入库门店');
|
|
|
}
|
|
|
|
|
|
+ $changeList = $post['changeList'] ?? [];
|
|
|
+ if(!empty($changeList)){
|
|
|
+ print_r($changeList);die;
|
|
|
+ }
|
|
|
+
|
|
|
$inItemList = StockInOrderItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*');
|
|
|
if (empty($inItemList)) {
|
|
|
util::fail('没有找到入库单的花材');
|
|
|
@@ -252,9 +257,9 @@ class StockOutController extends BaseController
|
|
|
foreach ($ghsItemInfo as $v) {
|
|
|
$bigNum = $v['bigNum'] ?? 0;
|
|
|
$smallNum = $v['smallNum'] ?? 0;
|
|
|
- $name = $v['name']??'';
|
|
|
- if($smallNum > 0){
|
|
|
- util::fail($name.'不能调拨小单位');
|
|
|
+ $name = $v['name'] ?? '';
|
|
|
+ if ($smallNum > 0) {
|
|
|
+ util::fail($name . '不能调拨小单位');
|
|
|
}
|
|
|
if ($bigNum <= 0) {
|
|
|
util::fail('花材数量不能为0');
|