asJson($res); } public function actionInitStoreGoods() { $res = InventoryForm::initStoreGoods(get_store_id()); return $this->asJson($res); } public function actionInitGoods() { $res = InventoryForm::initGoods(get_store_id(), input_params('id')); return $this->asJson($res); } /** * @return \yii\web\Response * 获取列表 */ public function actionList() { $form = new InventoryForm(); $form->store_id = get_store_id(); $form->attributes = all_params(); $res = $form->search(1, all_params()); return $this->asJson($res); } public function actionWarningList() { $form = new InventoryForm(); $form->store_id = get_store_id(); $form->attributes = all_params(); $res = $form->warningList(all_params()); return $this->asJson($res); } /** * @return \yii\web\Response * 保存信息 */ public function actionSaveSupplier() { $form = new InventoryForm(); $form->store_id = get_store_id(); $form->attributes = all_params(); $res = $form->saveSupplier(); return $this->asJson($res); } public function actionSaveWarningNum() { $res = ERP::saveWarningNum(get_store_id(), input_params('warning_num', 0)); return $this->asJson($res); } public function actionGetWarningNum() { $res = ERP::getWarningNum(get_store_id()); return $this->asJson([ 'code' => 0, 'data' => $res, ]); } public function actionSaveKey() { $form = new InventoryForm(); $form->store_id = get_store_id(); $form->attributes = all_params(); $res = $form->saveKey(); return $this->asJson($res); } /** * @return \yii\web\Response * 修改状态 */ public function actionDel() { $form = new InventoryForm(); $form->store_id = get_store_id(); $form->attributes = all_params(); $res = $form->del(all_params()); return $this->asJson($res); } public function actionLogList() { $form = new InventoryForm(); $form->store_id = get_store_id(); $form->attributes = all_params(); $res = $form->logList(); return $this->asJson($res); } }