|
@@ -3,10 +3,18 @@ declare (strict_types = 1);
|
|
|
|
|
|
namespace app\cxinv\controller;
|
|
|
|
|
|
-use app\common\Ocr;use think\Request;
|
|
|
+use app\common\Ocr;
|
|
|
+use app\cxinv\model\GodTemp;
|
|
|
+use think\App;
|
|
|
+use think\Request;
|
|
|
|
|
|
-class Index
|
|
|
+class Index extends Base
|
|
|
{
|
|
|
+
|
|
|
+ public function __construct(App $app)
|
|
|
+ {
|
|
|
+ parent::__construct($app);
|
|
|
+ }
|
|
|
/**
|
|
|
* 显示资源列表
|
|
|
*
|
|
@@ -27,14 +35,15 @@ class Index
|
|
|
return json($data);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 显示创建资源表单页.
|
|
|
- *
|
|
|
- * @return \think\Response
|
|
|
- */
|
|
|
- public function create()
|
|
|
+ //商品库模糊查询
|
|
|
+ public function List()
|
|
|
{
|
|
|
+ $param = $this->request->param(['goodName'=>"","code"=>"","page"=>1,"size"=>20],"post",'trim');
|
|
|
+ $where=[];
|
|
|
+ if($param['goodName']!='') $where[]=['goodName','like','%'.$param['goodName'].'%'];
|
|
|
+ if($param['code']!='') $where[]=['code','like','%'.$param['code'].'%'];
|
|
|
+ $list = GodTemp::where($where)->order('id desc')->paginate(['page'=>$param['page'],'list_rows'=>$param['size']]);
|
|
|
+ return success("获取成功",['list'=>$list->items(),'count'=>$list->total()]);
|
|
|
}
|
|
|
|
|
|
/**
|