- 移除了供应链相关代码,包括 SupplierController、SupplierLists 和 SupplierLogic - 更新了 PurchaseOrderController 和 PurchaseProductController,调整了相关逻辑 - 修改了 PurchaseProductLists 中的供应商名称获取方式 - 优化了 PurchaseOrderLogic 中的订单编辑逻辑 - 更新了 Supplier 模型的表名
131 lines
3.1 KiB
PHP
131 lines
3.1 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;
|
|
use app\psi\logic\purchase_product\PurchaseProductLogic;
|
|
|
|
/**
|
|
* 商品仓储信息控制器
|
|
* 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 = PurchaseProductLogic::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 = $this->request->post();
|
|
PurchaseProductLogic::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 = $this->request->post();
|
|
$result = PurchaseProductLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
/**
|
|
* 确认操作
|
|
*/
|
|
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 = PurchaseProductLogic::settNums($params, $this->adminId);
|
|
return $this->success('');
|
|
}
|
|
|
|
/**
|
|
* 分拣
|
|
*/
|
|
public function warehouse()
|
|
{
|
|
$params = $this->request->post();
|
|
$result = PurchaseProductLogic::warehouse($params);
|
|
return $this->success('');
|
|
}
|
|
|
|
/**
|
|
* 追加商品
|
|
*/
|
|
public function add_arr()
|
|
{
|
|
$params = $this->request->post();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = PurchaseProductLogic::addArr($params);
|
|
return $this->success('');
|
|
}
|
|
}
|