12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: http://demo.thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\approve\controller;
- use app\common\constant\CommonConstant;
- use app\common\model\GoodsStockLog as model;
- use library\Controller;
- /**
- * 商品入库记录
- */
- class GoodsStockLog extends Controller
- {
- /**
- * 绑定数据表
- * @var string
- */
- protected $table = 'GoodsStockLog';
- /**
- * 控制器初始化
- */
- protected function initialize()
- {
- $this->get_goods_stock_log_list = CommonConstant::get_goods_stock_log_list();
- }
- /**
- * 列表
- * @auth true
- * @menu true
- * @throws \think\Exception
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\ModelNotFoundException
- * @throws \think\exception\DbException
- */
- public function index()
- {
- $this->type = $type = input('type') ?: 0;
- $this->goods_id = $goods_id = input('goods_id') ?: 0;
- $this->title = '商品入库出库记录';
- $data = model::when($type > 0, function ($query) use ($type) {
- $query->where('type', $type);
- })
- ->where('goods_id', $goods_id)
- ->order('id desc');
- self::_init($data);
- }
- }
|