|
|
@@ -182,9 +182,15 @@ class WorkController extends BaseController
|
|
|
}
|
|
|
//花材未锁定,需要锁定并扣库存
|
|
|
if ($work->stockLock == 0) {
|
|
|
-
|
|
|
- print_r($post);die;
|
|
|
-
|
|
|
+ $itemList = $post['itemList'] ?? '';
|
|
|
+ if (empty($itemList)) {
|
|
|
+ util::fail('请选择花材');
|
|
|
+ }
|
|
|
+ $product = json_decode($itemList, treu);
|
|
|
+ if (empty($product)) {
|
|
|
+ util::fail('请选择花材哦');
|
|
|
+ }
|
|
|
+ WorkItemClass::modifyItem($work, $product);
|
|
|
WorkItemClass::lock($work);
|
|
|
}
|
|
|
WorkClass::finish($work);
|