- 移除 PsiOrder、PsiProduct、Warehouse 等模型类 - 删除 PsiOrderController、PsiProductController 控制器 - 移除 PsiOrderLists 列表类 - 清理 StoreProductLists 中的冗余代码 - 更新 Warehouse 和 WarehouseStorege 模型的表名
122 lines
3.0 KiB
PHP
122 lines
3.0 KiB
PHP
<?php
|
|
|
|
namespace app\psi\controller\purchase_product;
|
|
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\admin\logic\warehouse_product\WarehouseProductLogic;
|
|
use app\admin\validate\warehouse_product\WarehouseProductValidate;
|
|
use app\psi\lists\purchase_product\PurchaseProductLists;
|
|
|
|
/**
|
|
* 商品仓储信息控制器
|
|
* Class PurchaseProductController
|
|
* @package app\admin\controller\warehouse_product
|
|
*/
|
|
class PurchaseProductController extends BaseAdminController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取商品仓储信息列表
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/07/31 16:55
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new PurchaseProductLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 添加商品出入库信息
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/07/31 16:55
|
|
*/
|
|
public function add()
|
|
{
|
|
return $this->fail('当前接口废弃');
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑商品仓储信息
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/07/31 16:55
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = $this->request->post();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = WarehouseProductLogic::edit($params,$this->adminId);
|
|
return $this->success('编辑成功', [], 1, 1);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 删除商品仓储信息
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/07/31 16:55
|
|
*/
|
|
public function delete()
|
|
{
|
|
$params = (new WarehouseProductValidate())->post()->goCheck('delete');
|
|
WarehouseProductLogic::delete($params,$this->adminId);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 获取商品仓储信息详情
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/07/31 16:55
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new WarehouseProductValidate())->goCheck('detail');
|
|
$result = WarehouseProductLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 结算
|
|
* @return \think\response\Json
|
|
* @author admin
|
|
* @date 2024/07/31 16:55
|
|
*/
|
|
public function settlement(){
|
|
$id=$this->request->post('id');
|
|
$result = WarehouseProductLogic::settlement($id);
|
|
return $this->success('结算成功', [], 1, 1);
|
|
}
|
|
/**
|
|
* 确认操作
|
|
*/
|
|
public function enter()
|
|
{
|
|
// $id=$this->request->post('id');
|
|
// $result = WarehouseProductLogic::enter($id);
|
|
// if (true === $result) {
|
|
// return $this->success('编辑成功', [], 1, 1);
|
|
// }
|
|
// return $this->fail(WarehouseProductLogic::getError());
|
|
return $this->success('');
|
|
}
|
|
|
|
/**
|
|
* 仓库重置出入库数量
|
|
*/
|
|
public function set_nums()
|
|
{
|
|
$params=$this->request->post();
|
|
$result = WarehouseProductLogic::settNums($params,$this->adminId);
|
|
return $this->success('');
|
|
}
|
|
}
|