12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class AssetCheck extends Base
- {
- // 新增
- public function save(){
- model('AssetCheck')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('AssetCheck')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $status = input('status/d',-1);
- $ret = model('AssetCheck')->lists($page,$size,$status,$this->orgId);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('AssetCheck')->del($id);
- HelpHander::success([],'操作成功');
- }
- // 完成盘点
- public function finish(){
- $id = input('id/d',0);
- model('AssetCheck')->finish($id);
- HelpHander::success([],'操作成功');
- }
- // 盘库物品列表
- public function items(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $status = input('status/d',-1);
- $title = input('title','','trim');
- $checkId = input('checkId/d',0);
- $ret = model('AssetCheck')->items($page,$size,$checkId,$status,$title);
- HelpHander::success($ret);
- }
- // 所有盘库物品列表
- public function allItems(){
- $checkId = input('checkId/d',0);
- $ret = model('AssetCheck')->allItems($checkId);
- HelpHander::success($ret);
- }
- // 删除资产
- public function delItems(){
- $id = input('id/d',0);
- model('AssetCheck')->delItems($id);
- HelpHander::success([],'操作成功');
- }
- // 收到盘点
- public function finishItems(){
- $id = input('id/d',0);
- model('AssetCheck')->finishItems($id);
- HelpHander::success([],'操作成功');
- }
- }
|