request->get(); $id = $get['id'] ?? 0; $cg = PlantCgClass::getById($id, true); if ($cg->mainId != $this->mainId) { util::fail('没有权限'); } $itemList = PlantCgItemClass::getItemList($cg); $data = []; $data['hasDebtPay'] = 0; $data['balance'] = 0; $data['info'] = $cg; $data['itemList'] = $itemList; util::success($data); } //采购记录 ssh 20220521 public function actionList() { $get = Yii::$app->request->get(); $where = ['shopId' => $this->shopId]; $status = $get['status'] ?? 0; if (!empty($status)) { $where['status'] = $status; } $respond = PlantCgClass::getCgList($where); $respond['shop'] = $this->shop; util::success($respond); } //获取采购详情 ssh 20220508 public function actionGetFullInfo() { $id = Yii::$app->request->get('id'); $cg = PlantCgClass::getById($id, true); PlantCgClass::valid($cg, $this->mainId); $orderSn = $cg->orderSn ?? ''; $itemList = PlantCgItemClass::getAllByCondition(['orderSn' => $orderSn], null, '*'); util::success(['info' => $cg, 'itemList' => $itemList]); } }