wupengfei 2 年之前
父節點
當前提交
865c7d38f9
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      application/purchase/controller/DepotGoods.php

+ 2 - 3
application/purchase/controller/DepotGoods.php

@@ -164,9 +164,8 @@ class DepotGoods extends Controller
         if ($this->request->isGet()) {
             $id = $this->request->get('id');
             $depot_goods = Db::name('DepotGoods')->where(['id' => $id])->find();
-            $list = Db::name('DepotGoodsItem')->where(['goods_id' => $depot_goods['goods_id'],'depot_id'=>$depot_goods['depot_id']])->select();
-            var_dump($list,$depot_goods);
-            $this->fetch('', ['list' => $list,'depot_id'=>$depot_goods['depot_id'],'goods_id'=>$depot_goods['goods_id']]);
+            $list = Db::name('DepotGoodsItem')->where(['goods_id' => $depot_goods['id'],'depot_id'=>$depot_goods['depot_id']])->select();
+            $this->fetch('', ['list' => $list,'depot_id'=>$depot_goods['depot_id'],'goods_id'=>$depot_goods['id']]);
         } else {
             list($post, $data) = [$this->request->post(), []];
             if(!$post['depot_id'] || !$post['goods_id'] ||!$post['order_id']) $this->error('参数错误');