|
|
@@ -10,6 +10,39 @@ use Yii;
|
|
|
class PlantCgController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ //采购详情 ssh 2020521
|
|
|
+ public function actionDetail()
|
|
|
+ {
|
|
|
+ $get = Yii::$app->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()
|
|
|
{
|